diff options
author | Tom Rini <trini@ti.com> | 2012-11-19 09:27:18 -0700 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-11-19 09:27:18 -0700 |
commit | bb367b95f9204115bd6eac82e839b5590e6da4eb (patch) | |
tree | a64a8fb6c7a86d79e9a4a0c32d48c033236815fb /board/freescale/mx35pdk/mx35pdk.c | |
parent | db71964235c1dfa13ec398da483b0bdbbf31d5b7 (diff) | |
parent | 59ddead140a7cfda78bc36e22aadc48f3b962e59 (diff) | |
download | u-boot-imx-bb367b95f9204115bd6eac82e839b5590e6da4eb.zip u-boot-imx-bb367b95f9204115bd6eac82e839b5590e6da4eb.tar.gz u-boot-imx-bb367b95f9204115bd6eac82e839b5590e6da4eb.tar.bz2 |
Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
Diffstat (limited to 'board/freescale/mx35pdk/mx35pdk.c')
-rw-r--r-- | board/freescale/mx35pdk/mx35pdk.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c index a12531f..c835b0e 100644 --- a/board/freescale/mx35pdk/mx35pdk.c +++ b/board/freescale/mx35pdk/mx35pdk.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 <mmc.h> #include <fsl_esdhc.h> @@ -207,7 +207,9 @@ int board_init(void) static inline int pmic_detect(void) { unsigned int id; - struct pmic *p = get_pmic(); + struct pmic *p = pmic_get("FSL_PMIC"); + if (!p) + return -ENODEV; pmic_reg_read(p, REG_IDENTIFICATION, &id); @@ -231,10 +233,14 @@ int board_late_init(void) u8 val; u32 pmic_val; struct pmic *p; + int ret; + + ret = pmic_init(I2C_PMIC); + if (ret) + return ret; - pmic_init(); if (pmic_detect()) { - p = get_pmic(); + p = pmic_get("FSL_PMIC"); mxc_request_iomux(MX35_PIN_WATCHDOG_RST, MUX_CONFIG_SION | MUX_CONFIG_ALT1); |