Skip to contentSkip to conversation

ARM: imx: improve status check of clock gate

PATCH Applied Anson Huang 2 participants 2 messages Dec 24, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx: improve status check of clock gate

For ccm clock gate, both 2b'11 and 2b'01 should be treated as clock enabled, see below description in CCM, whenver CPU trys to check clock gate's status, system will be in run mode.

2b'00: clock is off during all modes;
2b'01: clock is on in run mode, but off in wait and stop mode; 2b'10: Not applicable;
2b'11: clock is on during all modes, except stop mode.

---
 arch/arm/mach-imx/clk-gate2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/clk-gate2.c +1 -1
index a63e415..a2ecc00 100644
@@ -72,7 +72,7 @@ static int clk_gate2_is_enabled(struct clk_hw *hw)
 
 	reg = readl(gate->reg);
 
-	if (((reg >> gate->bit_idx) & 3) == 3)
+	if (((reg >> gate->bit_idx) & 1) == 1)
 		return 1;
 
 	return 0;
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 10 lines · Anson Huang

For ccm clock gate, both 2b'11 and 2b'01 should be treated as clock enabled, see below description in CCM, whenver CPU trys to check clock gate's status, system will be in run mode.

2b'00: clock is off during all modes;
2b'01: clock is on in run mode, but off in wait and stop mode; 2b'10: Not applicable;
2b'11: clock is on during all modes, except stop mode.

Applied, thanks.