From 40e78d62db7f54912e6b8d95e8ec6ca5cfca63c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Tue, 30 Oct 2012 14:46:59 +0800 Subject: [PATCH] rk3108:fixed pmu error --- arch/arm/mach-rk30/board-rk3108-tb.c | 35 +++++++++++++++------------- 1 file changed, 19 insertions(+), 16 deletions(-) mode change 100644 => 100755 arch/arm/mach-rk30/board-rk3108-tb.c diff --git a/arch/arm/mach-rk30/board-rk3108-tb.c b/arch/arm/mach-rk30/board-rk3108-tb.c old mode 100644 new mode 100755 index a4bf83f88214..606c7a60335f --- a/arch/arm/mach-rk30/board-rk3108-tb.c +++ b/arch/arm/mach-rk30/board-rk3108-tb.c @@ -1430,7 +1430,7 @@ static struct pmu_info wm8326_ldo_info[] = { }, }; -#include "board-rk3066b-wm8326.c" +#include "board-pmu-wm8326.c" #endif #ifdef CONFIG_MFD_TPS65910 @@ -1503,7 +1503,7 @@ static struct pmu_info tps65910_ldo_info[] = { }, }; -#include "board-rk3066b-tps65910.c" +#include "board-pmu-tps65910.c" #endif static struct i2c_board_info __initdata i2c1_info[] = { @@ -1552,32 +1552,35 @@ void __sramfunc board_pmu_resume(void) #endif } - int __sramdata gpio0d7_iomux,gpio0d7_do,gpio0d7_dir,gpio0d7_en; + int __sramdata gpio3d6_iomux,gpio3d6_do,gpio3d6_dir,gpio3d6_en; +#define grf_readl(offset) readl_relaxed(RK30_GRF_BASE + offset) +#define grf_writel(v, offset) do { writel_relaxed(v, RK30_GRF_BASE + offset); dsb(); } while (0) + void __sramfunc rk30_pwm_logic_suspend_voltage(void) { #ifdef CONFIG_RK30_PWM_REGULATOR // int gpio0d7_iomux,gpio0d7_do,gpio0d7_dir,gpio0d7_en; sram_udelay(10000); - gpio0d7_iomux = readl_relaxed(GRF_GPIO0D_IOMUX); - gpio0d7_do = grf_readl(GRF_GPIO0H_DO); - gpio0d7_dir = grf_readl(GRF_GPIO0H_DIR); - gpio0d7_en = grf_readl(GRF_GPIO0H_EN); - - writel_relaxed((1<<30), GRF_GPIO0D_IOMUX); - grf_writel((1<<31)|(1<<15), GRF_GPIO0H_DIR); - grf_writel((1<<31)|(1<<15), GRF_GPIO0H_DO); - grf_writel((1<<31)|(1<<15), GRF_GPIO0H_EN); + gpio3d6_iomux = readl_relaxed(GRF_GPIO3D_IOMUX); + gpio3d6_do = grf_readl(GRF_GPIO3H_DO); + gpio3d6_dir = grf_readl(GRF_GPIO3H_DIR); + gpio3d6_en = grf_readl(GRF_GPIO3H_EN); + + writel_relaxed((1<<28), GRF_GPIO3D_IOMUX); + grf_writel((1<<30)|(1<<14), GRF_GPIO3H_DIR); + grf_writel((1<<30)|(1<<14), GRF_GPIO3H_DO); + grf_writel((1<<30)|(1<<14), GRF_GPIO3H_EN); #endif } void __sramfunc rk30_pwm_logic_resume_voltage(void) { #ifdef CONFIG_RK30_PWM_REGULATOR - writel_relaxed((1<<30)|gpio0d7_iomux, GRF_GPIO0D_IOMUX); - grf_writel((1<<31)|gpio0d7_en, GRF_GPIO0H_EN); - grf_writel((1<<31)|gpio0d7_dir, GRF_GPIO0H_DIR); - grf_writel((1<<31)|gpio0d7_do, GRF_GPIO0H_DO); + writel_relaxed((1<<28)|gpio3d6_iomux, GRF_GPIO3D_IOMUX); + grf_writel((1<<30)|gpio3d6_en, GRF_GPIO3H_EN); + grf_writel((1<<30)|gpio3d6_dir, GRF_GPIO3H_DIR); + grf_writel((1<<30)|gpio3d6_do, GRF_GPIO3H_DO); sram_udelay(10000); #endif -- 2.34.1