Thread (30 messages) 30 messages, 5 authors, 2014-11-03
STALE4247d REVIEWED: 1 (0M)
Revisions (5)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 current
  4. v2 [diff vs current]
  5. v3 [diff vs current]

[PATCH 1/4] clocksource: armada-370-xp: Add missing clock enable

From: Gregory CLEMENT <hidden>
Date: 2014-10-22 14:37:47
Also in: linux-watchdog

Hi Ezequiel,

On 22/10/2014 15:34, Ezequiel Garcia wrote:
This commit makes sure the timer clock is prepared and enabled
before retrieving its rate.
Acked-by: Gregory CLEMENT <redacted>


Thanks,

Gregory
quoted hunk ↗ jump to hunk
Signed-off-by: Ezequiel Garcia <redacted>
---
 drivers/clocksource/time-armada-370-xp.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c
index 0451e62..d8555f9 100644
--- a/drivers/clocksource/time-armada-370-xp.c
+++ b/drivers/clocksource/time-armada-370-xp.c
@@ -293,6 +293,7 @@ static void __init armada_xp_timer_init(struct device_node *np)
 
 	/* The 25Mhz fixed clock is mandatory, and must always be available */
 	BUG_ON(IS_ERR(clk));
+	clk_prepare_enable(clk);
 	timer_clk = clk_get_rate(clk);
 
 	armada_370_xp_timer_common_init(np);
@@ -305,6 +306,7 @@ static void __init armada_370_timer_init(struct device_node *np)
 	struct clk *clk = of_clk_get(np, 0);
 
 	BUG_ON(IS_ERR(clk));
+	clk_prepare_enable(clk);
 	timer_clk = clk_get_rate(clk) / TIMER_DIVIDER;
 	timer25Mhz = false;
 

-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help