summaryrefslogtreecommitdiff
path: root/board/freescale/mx35pdk
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2011-10-06 21:07:42 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-10-27 21:56:31 +0200
commit5213d6e48e1f02beb65dfaf6c0f5ca5cdf742697 (patch)
tree187d1ddd08aed3e316632047c4e9fadb17f4703e /board/freescale/mx35pdk
parentb7b7d3ccfd16c5b500ea4c1257269a42aaaeac84 (diff)
downloadu-boot-imx-5213d6e48e1f02beb65dfaf6c0f5ca5cdf742697.zip
u-boot-imx-5213d6e48e1f02beb65dfaf6c0f5ca5cdf742697.tar.gz
u-boot-imx-5213d6e48e1f02beb65dfaf6c0f5ca5cdf742697.tar.bz2
MX35: mx35pdk: use new pmic driver
Switch to new pmic generic driver. Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'board/freescale/mx35pdk')
-rw-r--r--board/freescale/mx35pdk/mx35pdk.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index 8f9b857..84a50b6 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -30,6 +30,7 @@
#include <asm/arch/mx35_pins.h>
#include <asm/arch/iomux.h>
#include <i2c.h>
+#include <pmic.h>
#include <fsl_pmic.h>
#include <mc9sdz60.h>
#include <mc13892.h>
@@ -202,9 +203,10 @@ int board_init(void)
static inline int pmic_detect(void)
{
- int id;
+ unsigned int id;
+ struct pmic *p = get_pmic();
- id = pmic_reg_read(REG_IDENTIFICATION);
+ pmic_reg_read(p, REG_IDENTIFICATION, &id);
id = (id >> 6) & 0x7;
if (id == 0x7)
@@ -225,15 +227,19 @@ int board_late_init(void)
{
u8 val;
u32 pmic_val;
+ struct pmic *p;
+ pmic_init();
if (pmic_detect()) {
+ p = get_pmic();
mxc_request_iomux(MX35_PIN_WATCHDOG_RST, MUX_CONFIG_SION |
MUX_CONFIG_ALT1);
- pmic_val = pmic_reg_read(REG_SETTING_0);
- pmic_reg_write(REG_SETTING_0, pmic_val | VO_1_30V | VO_1_50V);
- pmic_val = pmic_reg_read(REG_MODE_0);
- pmic_reg_write(REG_MODE_0, pmic_val | VGEN3EN);
+ pmic_reg_read(p, REG_SETTING_0, &pmic_val);
+ pmic_reg_write(p, REG_SETTING_0,
+ pmic_val | VO_1_30V | VO_1_50V);
+ pmic_reg_read(p, REG_MODE_0, &pmic_val);
+ pmic_reg_write(p, REG_MODE_0, pmic_val | VGEN3EN);
mxc_request_iomux(MX35_PIN_COMPARE, MUX_CONFIG_GPIO);
mxc_iomux_set_input(MUX_IN_GPIO1_IN_5, INPUT_CTL_PATH0);