All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] ARM: imx: improve status check of clock gate
  2013-12-24 19:21 ` Anson Huang
@ 2013-12-24  8:23   ` Shawn Guo
  -1 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2013-12-24  8:23 UTC (permalink / raw)
  To: Anson Huang; +Cc: kernel, linux-arm-kernel, linux-kernel

On Tue, Dec 24, 2013 at 02:21:27PM -0500, Anson Huang wrote:
> 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 <b20788@freescale.com>

Applied, thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: imx: improve status check of clock gate
@ 2013-12-24  8:23   ` Shawn Guo
  0 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2013-12-24  8:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Dec 24, 2013 at 02:21:27PM -0500, Anson Huang wrote:
> 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 <b20788@freescale.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] ARM: imx: improve status check of clock gate
@ 2013-12-24 19:21 ` Anson Huang
  0 siblings, 0 replies; 4+ messages in thread
From: Anson Huang @ 2013-12-24 19:21 UTC (permalink / raw)
  To: shawn.guo, kernel; +Cc: linux-arm-kernel, linux-kernel

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 <b20788@freescale.com>
---
 arch/arm/mach-imx/clk-gate2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/clk-gate2.c b/arch/arm/mach-imx/clk-gate2.c
index a63e415..a2ecc00 100644
--- a/arch/arm/mach-imx/clk-gate2.c
+++ b/arch/arm/mach-imx/clk-gate2.c
@@ -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;
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ARM: imx: improve status check of clock gate
@ 2013-12-24 19:21 ` Anson Huang
  0 siblings, 0 replies; 4+ messages in thread
From: Anson Huang @ 2013-12-24 19:21 UTC (permalink / raw)
  To: linux-arm-kernel

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 <b20788@freescale.com>
---
 arch/arm/mach-imx/clk-gate2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/clk-gate2.c b/arch/arm/mach-imx/clk-gate2.c
index a63e415..a2ecc00 100644
--- a/arch/arm/mach-imx/clk-gate2.c
+++ b/arch/arm/mach-imx/clk-gate2.c
@@ -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;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-24 19:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-24 19:21 [PATCH] ARM: imx: improve status check of clock gate Anson Huang
2013-12-24 19:21 ` Anson Huang
2013-12-24  8:23 ` Shawn Guo
2013-12-24  8:23   ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.