From f33bd087c6a6b833236cb2f327cab39fe218c38c Mon Sep 17 00:00:00 2001 From: Stefano Babic Date: Thu, 6 Oct 2011 11:23:33 +0200 Subject: [PATCH] MX3: qong: use new pmic driver Switch to new pmic generic driver. Signed-off-by: Stefano Babic --- board/davedenx/qong/qong.c | 11 ++++++++--- include/configs/qong.h | 5 ++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/board/davedenx/qong/qong.c b/board/davedenx/qong/qong.c index 9fca1f8ddf..a9f2ef0d9d 100644 --- a/board/davedenx/qong/qong.c +++ b/board/davedenx/qong/qong.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #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(); diff --git a/include/configs/qong.h b/include/configs/qong.h index b1fc80c527..f2a1e0143d 100644 --- a/include/configs/qong.h +++ b/include/configs/qong.h @@ -60,11 +60,14 @@ #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 -- 2.25.1