diff options
author | Stefano Babic <sbabic@denx.de> | 2011-10-08 11:00:22 +0200 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2011-10-27 21:56:32 +0200 |
commit | bba1b6cf15d9571e55f34a4af09c2639fd05b6dc (patch) | |
tree | fd16980673a4c23196955a82d73c87266bad78ea /board/freescale | |
parent | 5357265a62699e77ff6b78040d2a66833a48fc08 (diff) | |
download | u-boot-imx-bba1b6cf15d9571e55f34a4af09c2639fd05b6dc.zip u-boot-imx-bba1b6cf15d9571e55f34a4af09c2639fd05b6dc.tar.gz u-boot-imx-bba1b6cf15d9571e55f34a4af09c2639fd05b6dc.tar.bz2 |
MX5: mx53evk: use new pmic driver
Switch to new pmic generic driver.
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Jason Liu <jason.hui@linaro.org>
Acked-by: Jason Liu <jason.hui@linaro.org>
Diffstat (limited to 'board/freescale')
-rw-r--r-- | board/freescale/mx53evk/mx53evk.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c index fd821c0..eab9c5f 100644 --- a/board/freescale/mx53evk/mx53evk.c +++ b/board/freescale/mx53evk/mx53evk.c @@ -32,6 +32,7 @@ #include <i2c.h> #include <mmc.h> #include <fsl_esdhc.h> +#include <pmic.h> #include <fsl_pmic.h> #include <asm/gpio.h> #include <mc13892.h> @@ -124,12 +125,16 @@ static void setup_i2c(unsigned int port_number) void power_init(void) { unsigned int val; + struct pmic *p; + + pmic_init(); + p = get_pmic(); /* Set VDDA to 1.25V */ - val = pmic_reg_read(REG_SW_2); + pmic_reg_read(p, REG_SW_2, &val); val &= ~SWX_OUT_MASK; val |= SWX_OUT_1_25; - pmic_reg_write(REG_SW_2, val); + pmic_reg_write(p, REG_SW_2, val); /* * Need increase VCC and VDDA to 1.3V @@ -137,16 +142,16 @@ void power_init(void) */ if (is_soc_rev(CHIP_REV_2_0) == 0) { /* Set VCC to 1.3V for TO2 */ - val = pmic_reg_read(REG_SW_1); + pmic_reg_read(p, REG_SW_1, &val); val &= ~SWX_OUT_MASK; val |= SWX_OUT_1_30; - pmic_reg_write(REG_SW_1, val); + pmic_reg_write(p, REG_SW_1, val); /* Set VDDA to 1.3V for TO2 */ - val = pmic_reg_read(REG_SW_2); + pmic_reg_read(p, REG_SW_2, &val); val &= ~SWX_OUT_MASK; val |= SWX_OUT_1_30; - pmic_reg_write(REG_SW_2, val); + pmic_reg_write(p, REG_SW_2, val); } } |