From: phc Date: Thu, 12 May 2011 07:18:17 +0000 (+0800) Subject: RK29MobileSDK: Open Uart0 CLK when system in sleep; X-Git-Tag: firefly_0821_release~10333 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9e3e1986b475e5d434f99669c3fc94751138665c;p=firefly-linux-kernel-4.4.55.git RK29MobileSDK: Open Uart0 CLK when system in sleep; --- diff --git a/arch/arm/mach-rk29/pm.c b/arch/arm/mach-rk29/pm.c index 3a02514ef884..044952c3458e 100755 --- a/arch/arm/mach-rk29/pm.c +++ b/arch/arm/mach-rk29/pm.c @@ -404,7 +404,7 @@ static int rk29_pm_enter(suspend_state_t state) clkgate[1] = cru_readl(CRU_CLKGATE1_CON); clkgate[2] = cru_readl(CRU_CLKGATE2_CON); clkgate[3] = cru_clkgate3_con_mirror; - cru_writel(~((1 << CLK_GATE_CORE) + cru_writel((~((1 << CLK_GATE_CORE) | (1 << CLK_GATE_ACLK_CPU) | (1 << CLK_GATE_ACLK_CPU2) | (1 << CLK_GATE_PCLK_CPU) @@ -416,7 +416,7 @@ static int rk29_pm_enter(suspend_state_t state) | (1 << CLK_GATE_GPIO0) | (1 << CLK_GATE_RTC) | (1 << CLK_GATE_GRF) - ) | clkgate[0], CRU_CLKGATE0_CON); + ) | clkgate[0])&(~(1 << CLK_GATE_UART0)), CRU_CLKGATE0_CON); cru_writel(~0, CRU_CLKGATE1_CON); cru_writel(~((1 << CLK_GATE_GPIO1 % 32) | (1 << CLK_GATE_GPIO2 % 32) diff --git a/drivers/misc/mtk23d.c b/drivers/misc/mtk23d.c index d63ba9f954bb..a3e79e2b7f62 100755 --- a/drivers/misc/mtk23d.c +++ b/drivers/misc/mtk23d.c @@ -145,6 +145,12 @@ static int mtk23d_open(struct inode *inode, struct file *file) { power_on = 0; modem_poweron_off(1); + #if 1 // phc + rk29_mux_api_set(GPIO1B7_UART0SOUT_NAME, GPIO1L_UART0_SOUT); + rk29_mux_api_set(GPIO1B6_UART0SIN_NAME, GPIO1L_UART0_SIN); + rk29_mux_api_set(GPIO1C1_UART0RTSN_SDMMC1WRITEPRT_NAME, GPIO1H_UART0_RTS_N); + rk29_mux_api_set(GPIO1C0_UART0CTSN_SDMMC1DETECTN_NAME, GPIO1H_UART0_CTS_N); + #endif } device_init_wakeup(&pdev, 1);