]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/freescale/mx35pdk/mx35pdk.c
Merge branch 'master' of git://git.denx.de/u-boot into resolve
[karo-tx-uboot.git] / board / freescale / mx35pdk / mx35pdk.c
index 4d8f2f5eea34c1f2c37cd3ab73e62dcabdcf78c2..2aa000f238e43313bf4c2cd30ff0eb9fe0cbd2b7 100644 (file)
@@ -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>
@@ -228,7 +228,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);
 
@@ -252,10 +254,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);