summaryrefslogtreecommitdiff
path: root/board/freescale/mx25pdk/mx25pdk.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2012-12-11 04:58:02 +0000
committerStefano Babic <sbabic@denx.de>2012-12-11 17:41:19 +0100
commitcabe240b590adeed975d77744c120b3967a31c12 (patch)
tree2340db7631def564f04f52847b01794d0721d537 /board/freescale/mx25pdk/mx25pdk.c
parent05a860c228fe6c8f2e7aced8cc8ef88bc1038363 (diff)
downloadu-boot-imx-cabe240b590adeed975d77744c120b3967a31c12.zip
u-boot-imx-cabe240b590adeed975d77744c120b3967a31c12.tar.gz
u-boot-imx-cabe240b590adeed975d77744c120b3967a31c12.tar.bz2
mx25pdk: Adapt it for the new PMIC framework
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>
Diffstat (limited to 'board/freescale/mx25pdk/mx25pdk.c')
-rw-r--r--board/freescale/mx25pdk/mx25pdk.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/board/freescale/mx25pdk/mx25pdk.c b/board/freescale/mx25pdk/mx25pdk.c
index 72fa6bc..d73e27e 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);