rk29: more work around CRU_CLKGATE3_CON bit21~20 bug
author黄涛 <huangtao@rock-chips.com>
Sun, 13 Feb 2011 07:50:45 +0000 (15:50 +0800)
committer黄涛 <huangtao@rock-chips.com>
Sun, 13 Feb 2011 07:50:45 +0000 (15:50 +0800)
arch/arm/mach-rk29/clock.c
arch/arm/mach-rk29/include/mach/cru.h
arch/arm/mach-rk29/pm.c

index 3d5959da06df0be40d8a43a9234de66692a6ca0a..4ccc2d70807293f88b846fba1dc8620ce43b83b2 100755 (executable)
@@ -180,7 +180,7 @@ static int clksel_set_parent(struct clk *clk, struct clk *parent)
 }
 
 /* Work around CRU_CLKGATE3_CON bit21~20 bug */
-static volatile u32 cru_clkgate3_con_mirror;
+volatile u32 cru_clkgate3_con_mirror;
 
 static int gate_mode(struct clk *clk, int on)
 {
index b6602e9ea9d9781ba914677351a919d52f1643ce..158630fb76f81e70ed8d1496f5860f0077194b7f 100644 (file)
@@ -296,6 +296,7 @@ enum cru_soft_reset {
 #define CRU_SOFTRST1_CON       0x70
 #define CRU_SOFTRST2_CON       0x74
 
+extern volatile u32 cru_clkgate3_con_mirror;
 void cru_set_soft_reset(enum cru_soft_reset idx, bool on);
 
 #endif
index 153111ea8aaa8b7457ad7d37c1011312ad5c2755..09128ab22dd947c9f51293094b540aa81334674a 100644 (file)
@@ -92,7 +92,7 @@ static int rk29_pm_enter(suspend_state_t state)
        clkgate[0] = cru_readl(CRU_CLKGATE0_CON);
        clkgate[1] = cru_readl(CRU_CLKGATE1_CON);
        clkgate[2] = cru_readl(CRU_CLKGATE2_CON);
-       clkgate[3] = cru_readl(CRU_CLKGATE3_CON);
+       clkgate[3] = cru_clkgate3_con_mirror;
        cru_writel(~((1 << CLK_GATE_CORE)
                   | (1 << CLK_GATE_ACLK_CPU)
                   | (1 << CLK_GATE_ACLK_CPU2)