]> git.sur5r.net Git - u-boot/commitdiff
MX3: qong: use new pmic driver
authorStefano Babic <sbabic@denx.de>
Thu, 6 Oct 2011 09:23:33 +0000 (11:23 +0200)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Thu, 27 Oct 2011 19:56:31 +0000 (21:56 +0200)
Switch to new pmic generic driver.

Signed-off-by: Stefano Babic <sbabic@denx.de>
board/davedenx/qong/qong.c
include/configs/qong.h

index 9fca1f8ddf11d952a9f9774d0d5e54884a199652..a9f2ef0d9d83a4a46f29a0603aba2de6f89044e5 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
 #include <nand.h>
+#include <pmic.h>
 #include <fsl_pmic.h>
 #include <asm/gpio.h>
 #include "qong_fpga.h"
@@ -176,11 +177,15 @@ int board_init (void)
 int board_late_init(void)
 {
        u32 val;
+       struct pmic *p;
+
+       pmic_init();
+       p = get_pmic();
 
        /* Enable RTC battery */
-       val = pmic_reg_read(REG_POWER_CTL0);
-       pmic_reg_write(REG_POWER_CTL0, val | COINCHEN);
-       pmic_reg_write(REG_INT_STATUS1, RTCRSTI);
+       pmic_reg_read(p, REG_POWER_CTL0, &val);
+       pmic_reg_write(p, REG_POWER_CTL0, val | COINCHEN);
+       pmic_reg_write(p, REG_INT_STATUS1, RTCRSTI);
 
 #ifdef CONFIG_HW_WATCHDOG
        mxc_hw_watchdog_enable();
index b1fc80c527d1ae74f4b8042f567922d92c812f4b..f2a1e0143d2093b6948e09f0d399661376c3577d 100644 (file)
 #define CONFIG_DEFAULT_SPI_MODE        (SPI_MODE_0 | SPI_CS_HIGH)
 #define CONFIG_RTC_MC13783
 
-#define CONFIG_FSL_PMIC
+#define CONFIG_PMIC
+#define CONFIG_PMIC_SPI
+#define CONFIG_PMIC_FSL
 #define CONFIG_FSL_PMIC_BUS    1
 #define CONFIG_FSL_PMIC_CS     0
 #define CONFIG_FSL_PMIC_CLK    100000
 #define CONFIG_FSL_PMIC_MODE   (SPI_MODE_0 | SPI_CS_HIGH)
+#define CONFIG_FSL_PMIC_BITLEN 32
 
 /* FPGA */
 #define CONFIG_FPGA