From: xxx Date: Wed, 24 Apr 2013 10:42:00 +0000 (+0800) Subject: rk30: pm: fix usb uart bupass support X-Git-Tag: firefly_0821_release~7222 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=78c933a21da1c159c29502e4ade9e8a7f6ef5d35;p=firefly-linux-kernel-4.4.55.git rk30: pm: fix usb uart bupass support --- diff --git a/arch/arm/mach-rk30/pm.c b/arch/arm/mach-rk30/pm.c old mode 100644 new mode 100755 index dd059323ac89..d6fbb84c4630 --- a/arch/arm/mach-rk30/pm.c +++ b/arch/arm/mach-rk30/pm.c @@ -492,13 +492,22 @@ static void __sramfunc rk_pm_soc_sram_volt_resume(void) #define CLK_GATE_W_MSK8 (0x01ff) #define CLK_GATE_W_MSK9 (0x07ff) static u32 __sramdata clkgt_regs_sram[CRU_CLKGATES_CON_CNT]; -//static u32 __sramdata sram_grf_uoc0_con0_status; +static u32 __sramdata sram_grf_uoc0_con0_status; static void __sramfunc rk_pm_soc_sram_clk_gating(void) { u32 clkgt_regs_sram[CRU_CLKGATES_CON_CNT]; int i; + + #if defined(CONFIG_ARCH_RK3188) && (CONFIG_RK_DEBUG_UART == 2) + #ifdef CONFIG_RK_USB_UART + sram_grf_uoc0_con0_status = grf_readl(GRF_UOC0_CON0); + grf_writel(0x03000000, GRF_UOC0_CON0); + #endif + #endif + + for (i = 0; i < CRU_CLKGATES_CON_CNT; i++) { clkgt_regs_sram[i] = cru_readl(CRU_CLKGATES_CON(i)); } @@ -563,14 +572,15 @@ static void __sramfunc rk_pm_soc_sram_clk_gating(void) static void __sramfunc rk_pm_soc_sram_clk_ungating(void) { int i; -#if defined(CONFIG_ARCH_RK3188) && (CONFIG_RK_DEBUG_UART == 2) -#ifdef CONFIG_RK_USB_UART - grf_writel(0x03000000 | sram_grf_uoc0_con0_status, GRF_UOC0_CON0); -#endif -#endif for (i = 0; i < CRU_CLKGATES_CON_CNT; i++) { cru_writel(clkgt_regs_sram[i] | 0xffff0000, CRU_CLKGATES_CON(i)); } + + #if defined(CONFIG_ARCH_RK3188) && (CONFIG_RK_DEBUG_UART == 2) + #ifdef CONFIG_RK_USB_UART + grf_writel(0x03000000 | sram_grf_uoc0_con0_status, GRF_UOC0_CON0); + #endif + #endif } static u32 __sramdata sram_cru_clksel0_con, sram_cru_clksel10_con,sram_cru_mode_con;