SUPERH platform development
 help / color / mirror / Atom feed
* [PATCH] clk: shmobile: mstp: Fix the is_enabled() operation
@ 2014-03-12 21:04 Laurent Pinchart
  2014-03-13 11:27 ` Geert Uytterhoeven
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Laurent Pinchart @ 2014-03-12 21:04 UTC (permalink / raw)
  To: linux-sh

The MSTP[SC]R registers have clock stop bits, not clock enable bits. The
bit value should thus be inverted in the is_enabled() operation.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/clk/shmobile/clk-mstp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Geert, I believe this patch should fix the problem we've noticed with
clk_disable_unused() not disabling unused clocks. Could you please test it ?

diff --git a/drivers/clk/shmobile/clk-mstp.c b/drivers/clk/shmobile/clk-mstp.c
index 42d5912..be45b45 100644
--- a/drivers/clk/shmobile/clk-mstp.c
+++ b/drivers/clk/shmobile/clk-mstp.c
@@ -112,7 +112,7 @@ static int cpg_mstp_clock_is_enabled(struct clk_hw *hw)
 	else
 		value = clk_readl(group->smstpcr);
 
-	return !!(value & BIT(clock->bit_index));
+	return !(value & BIT(clock->bit_index));
 }
 
 static const struct clk_ops cpg_mstp_clock_ops = {
-- 
Regards,

Laurent Pinchart


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

end of thread, other threads:[~2014-03-13 14:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-12 21:04 [PATCH] clk: shmobile: mstp: Fix the is_enabled() operation Laurent Pinchart
2014-03-13 11:27 ` Geert Uytterhoeven
2014-03-13 11:35 ` Ben Dooks
2014-03-13 11:37 ` Geert Uytterhoeven
2014-03-13 11:38 ` Geert Uytterhoeven
2014-03-13 11:43 ` Ben Dooks
2014-03-13 11:50 ` Laurent Pinchart
2014-03-13 11:54 ` Ben Dooks
2014-03-13 13:13 ` Geert Uytterhoeven
2014-03-13 14:34 ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox