]> git.sur5r.net Git - u-boot/commitdiff
mx25pdk: Adapt it for the new PMIC framework
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 11 Dec 2012 04:58:02 +0000 (04:58 +0000)
committerStefano Babic <sbabic@denx.de>
Tue, 11 Dec 2012 16:41:19 +0000 (17:41 +0100)
Make the necessary adaptions for the new PMIC framework, so that mx25pdk can
be built again.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
board/freescale/mx25pdk/mx25pdk.c
include/configs/mx25pdk.h

index 72fa6bc82600109a28b5b037ed4932b4b48fe618..d73e27e5405ba24b1522bc7e998df5a777b02a8a 100644 (file)
@@ -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);
 
index b5338a0009030022e253deec6d808a0708eecd82..bbb31613bc99c6ee37d3c406e3d9baf6faff860e 100644 (file)
 #define CONFIG_SYS_FSL_ESDHC_NUM       1
 
 /* PMIC Configs */
-#define CONFIG_PMIC
-#define CONFIG_PMIC_I2C
-#define CONFIG_PMIC_FSL
+#define CONFIG_POWER
+#define CONFIG_POWER_I2C
+#define CONFIG_POWER_FSL
 #define CONFIG_PMIC_FSL_MC34704
 #define CONFIG_SYS_FSL_PMIC_I2C_ADDR   0x54