Skip to content

Commit

Permalink
ARM: imx: improve status check of clock gate
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Anson Huang <[email protected]>
Signed-off-by: Shawn Guo <[email protected]>
  • Loading branch information
Anson Huang authored and shawnguo2 committed Dec 31, 2013
1 parent adf15fa commit b4e844f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-imx/clk-gate2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b4e844f

Please sign in to comment.