From: wlf Date: Tue, 5 Mar 2013 07:11:59 +0000 (+0800) Subject: RK3188 USB: disable usb bypass uart function in standby, reduce power consumption X-Git-Tag: firefly_0821_release~7478 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4ebbf925a386f2f72d870ce79b5821f17f3be381;p=firefly-linux-kernel-4.4.55.git RK3188 USB: disable usb bypass uart function in standby, reduce power consumption --- diff --git a/arch/arm/mach-rk30/pm.c b/arch/arm/mach-rk30/pm.c index 2ad5e41c0a48..d27b1c67c6da 100755 --- a/arch/arm/mach-rk30/pm.c +++ b/arch/arm/mach-rk30/pm.c @@ -457,6 +457,7 @@ static void __sramfunc rk30_sram_suspend(void) u32 cru_clksel0_con, cru_clksel10_con; u32 clkgt_regs[CRU_CLKGATES_CON_CNT]; u32 cru_mode_con; + u32 grf_uoc0_con0_status; int i; sram_printch('5'); @@ -469,6 +470,13 @@ static void __sramfunc rk30_sram_suspend(void) board_act8846_set_suspend_vol(); #endif +#if defined(CONFIG_ARCH_RK3188) && (CONFIG_RK_DEBUG_UART == 2) +#ifdef CONFIG_RK_USB_UART + 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[i] = cru_readl(CRU_CLKGATES_CON(i)); } @@ -555,6 +563,13 @@ static void __sramfunc rk30_sram_suspend(void) #ifdef CONFIG_ACT8846_SUPPORT_RESET board_act8846_set_resume_vol(); #endif + +#if defined(CONFIG_ARCH_RK3188) && (CONFIG_RK_DEBUG_UART == 2) +#ifdef CONFIG_RK_USB_UART + grf_writel(0x03000000 | grf_uoc0_con0_status, GRF_UOC0_CON0); +#endif +#endif + sram_printch('7'); rk30_pwm_logic_resume_voltage(); rk30_suspend_voltage_resume(1100000);