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/mx53loco | |
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/mx53loco')
-rw-r--r-- | board/freescale/mx53loco/mx53loco.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c index a11e883..f4a9b08 100644 --- a/board/freescale/mx53loco/mx53loco.c +++ b/board/freescale/mx53loco/mx53loco.c @@ -36,7 +36,7 @@ #include <mmc.h> #include <fsl_esdhc.h> #include <asm/gpio.h> -#include <pmic.h> +#include <power/pmic.h> #include <dialog_pmic.h> #include <fsl_pmic.h> #include <linux/fb.h> @@ -344,10 +344,16 @@ static int power_init(void) unsigned int val; int ret = -1; struct pmic *p; + int retval; if (!i2c_probe(CONFIG_SYS_DIALOG_PMIC_I2C_ADDR)) { - pmic_dialog_init(); - p = get_pmic(); + retval = pmic_dialog_init(I2C_PMIC); + if (retval) + return retval; + + p = pmic_get("DIALOG_PMIC"); + if (!p) + return -ENODEV; /* Set VDDA to 1.25V */ val = DA9052_BUCKCORE_BCOREEN | DA_BUCKCORE_VBCORE_1_250V; @@ -363,8 +369,13 @@ static int power_init(void) } if (!i2c_probe(CONFIG_SYS_FSL_PMIC_I2C_ADDR)) { - pmic_init(); - p = get_pmic(); + retval = pmic_init(I2C_PMIC); + if (retval) + return retval; + + p = pmic_get("DIALOG_PMIC"); + if (!p) + return -ENODEV; /* Set VDDGP to 1.25V for 1GHz on SW1 */ pmic_reg_read(p, REG_SW_0, &val); |