diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/mx25pdk/mx25pdk.c | 13 | ||||
-rw-r--r-- | board/freescale/mx53loco/mx53loco.c | 2 | ||||
-rw-r--r-- | board/samsung/smdk5250/smdk5250.c | 15 | ||||
-rw-r--r-- | board/samsung/universal_c210/universal.c | 36 | ||||
-rw-r--r-- | board/woodburn/woodburn.c | 13 |
5 files changed, 41 insertions, 38 deletions
diff --git a/board/freescale/mx25pdk/mx25pdk.c b/board/freescale/mx25pdk/mx25pdk.c index 72fa6bc826..d73e27e540 100644 --- a/board/freescale/mx25pdk/mx25pdk.c +++ b/board/freescale/mx25pdk/mx25pdk.c @@ -27,7 +27,7 @@ #include <mmc.h> #include <fsl_esdhc.h> #include <i2c.h> -#include <pmic.h> +#include <power/pmic.h> #include <fsl_pmic.h> #include <mc34704.h> @@ -110,11 +110,18 @@ int board_init(void) int board_late_init(void) { struct pmic *p; + int ret; mx25pdk_fec_init(); - pmic_init(); - p = get_pmic(); + ret = pmic_init(I2C_PMIC); + if (ret) + return ret; + + p = pmic_get("FSL_PMIC"); + if (!p) + return -ENODEV; + /* Turn on Ethernet PHY supply */ pmic_reg_write(p, MC34704_GENERAL2_REG, ONOFFE); diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index 81c511cdc1..2c8cb7a1cc 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -374,7 +374,7 @@ static int power_init(void) if (retval) return retval; - p = pmic_get("DIALOG_PMIC"); + p = pmic_get("FSL_PMIC"); if (!p) return -ENODEV; diff --git a/board/samsung/smdk5250/smdk5250.c b/board/samsung/smdk5250/smdk5250.c index 4c50342e5c..9c926d6ecf 100644 --- a/board/samsung/smdk5250/smdk5250.c +++ b/board/samsung/smdk5250/smdk5250.c @@ -30,7 +30,7 @@ #include <asm/arch/mmc.h> #include <asm/arch/pinmux.h> #include <asm/arch/sromc.h> -#include <pmic.h> +#include <power/pmic.h> DECLARE_GLOBAL_DATA_PTR; @@ -65,9 +65,6 @@ static int smc9115_pre_init(void) int board_init(void) { gd->bd->bi_boot_params = (PHYS_SDRAM_1 + 0x100UL); -#if defined(CONFIG_PMIC) - pmic_init(); -#endif #ifdef CONFIG_EXYNOS_SPI spi_init(); #endif @@ -87,6 +84,16 @@ int dram_init(void) return 0; } +#if defined(CONFIG_POWER) +int power_init_board(void) +{ + if (pmic_init(I2C_PMIC)) + return -1; + else + return 0; +} +#endif + void dram_init_banksize(void) { gd->bd->bi_dram[0].start = PHYS_SDRAM_1; diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c index 1e67dea2ae..e742707f79 100644 --- a/board/samsung/universal_c210/universal.c +++ b/board/samsung/universal_c210/universal.c @@ -31,10 +31,6 @@ #include <asm/arch/gpio.h> #include <asm/arch/mmc.h> #include <asm/arch/pinmux.h> -#include <pmic.h> -#include <usb/s3c_udc.h> -#include <asm/arch/cpu.h> -#include <max8998_pmic.h> #include <asm/arch/watchdog.h> #include <libtizen.h> #include <ld9040.h> @@ -59,21 +55,7 @@ static int get_hwrev(void) return board_rev & 0xFF; } -static void check_hw_revision(void); - -int board_init(void) -{ - gpio1 = (struct exynos4_gpio_part1 *) EXYNOS4_GPIO_PART1_BASE; - gpio2 = (struct exynos4_gpio_part2 *) EXYNOS4_GPIO_PART2_BASE; - - gd->bd->bi_arch_number = MACH_TYPE_UNIVERSAL_C210; - gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; - - check_hw_revision(); - printf("HW Revision:\t0x%x\n", board_rev); - - return 0; -} +static void init_pmic_lcd(void); int power_init_board(void) { @@ -83,6 +65,8 @@ int power_init_board(void) if (ret) return ret; + init_pmic_lcd(); + return 0; } @@ -357,7 +341,10 @@ static void init_pmic_lcd(void) unsigned char val; int ret = 0; - struct pmic *p = get_pmic(); + struct pmic *p = pmic_get("MAX8998_PMIC"); + + if (!p) + return; if (pmic_probe(p)) return; @@ -448,7 +435,10 @@ static void reset_lcd(void) static void lcd_power_on(void) { - struct pmic *p = get_pmic(); + struct pmic *p = pmic_get("MAX8998_PMIC"); + + if (!p) + return; if (pmic_probe(p)) return; @@ -522,10 +512,6 @@ int board_init(void) gd->bd->bi_arch_number = MACH_TYPE_UNIVERSAL_C210; gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; -#if defined(CONFIG_PMIC) - pmic_init(); - init_pmic_lcd(); -#endif #ifdef CONFIG_SOFT_SPI soft_spi_init(); #endif diff --git a/board/woodburn/woodburn.c b/board/woodburn/woodburn.c index 286749f3c9..d74f360e13 100644 --- a/board/woodburn/woodburn.c +++ b/board/woodburn/woodburn.c @@ -31,7 +31,7 @@ #include <asm/arch/mx35_pins.h> #include <asm/arch/iomux.h> #include <i2c.h> -#include <pmic.h> +#include <power/pmic.h> #include <fsl_pmic.h> #include <mc13892.h> #include <mmc.h> @@ -133,8 +133,7 @@ int woodburn_init(void) mxc_request_iomux(MX35_PIN_SCKR, MUX_CONFIG_ALT5); gpio_direction_output(4, 1); mxc_request_iomux(MX35_PIN_HCKT, MUX_CONFIG_ALT5); - gpio_direction_output(9, 0); - gpio_set_value(9, 1); + gpio_direction_output(9, 1); return 0; } @@ -178,12 +177,16 @@ int board_init(void) { struct pmic *p; u32 val; + int ret; /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; - pmic_init(); - p = get_pmic(); + ret = pmic_init(I2C_PMIC); + if (ret) + return ret; + + p = pmic_get("FSL_PMIC"); /* * Set switchers in Auto in NORMAL mode & STANDBY mode |