From 6d5c4e55bd3cfae0f3f89a1b990a298331f9d523 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Mon, 2 Apr 2012 16:53:17 +0800 Subject: [PATCH] rk30: pm: fix sram_printch wrong write clksel register --- arch/arm/mach-rk30/pm.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-rk30/pm.c b/arch/arm/mach-rk30/pm.c index acc5a41f4acb..80c0cf81a12f 100755 --- a/arch/arm/mach-rk30/pm.c +++ b/arch/arm/mach-rk30/pm.c @@ -36,10 +36,7 @@ void __sramfunc sram_printch(char byte) { #ifdef DEBUG_UART_BASE - - int clk_gate2, clk_gate4, clk_gate8; - - clk_gate2 = cru_readl(CRU_CLKGATES_CON(2)); + u32 clk_gate2, clk_gate4, clk_gate8; gate_save_soc_clk(0 | (1 << CLK_GATE_ACLK_PEIRPH % 16) @@ -63,9 +60,9 @@ void __sramfunc sram_printch(char byte) while (!(readl_relaxed(DEBUG_UART_BASE + 0x14) & 0x40)) barrier(); - cru_writel(0xffff0000 | clk_gate2, CRU_CLKSELS_CON(2)); - cru_writel(0xffff0000 | clk_gate4, CRU_CLKSELS_CON(4)); - cru_writel(0xffff0000 | clk_gate8, CRU_CLKSELS_CON(8)); + cru_writel(0xffff0000 | clk_gate2, CRU_CLKGATES_CON(2)); + cru_writel(0xffff0000 | clk_gate4, CRU_CLKGATES_CON(4)); + cru_writel(0xffff0000 | clk_gate8, CRU_CLKGATES_CON(8)); if (byte == '\n') sram_printch('\r'); -- 2.34.1