aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEzequiel Garcia <[email protected]>2014-11-04 10:21:31 -0300
committerDaniel Lezcano <[email protected]>2014-11-26 13:51:07 +0100
commit551f2fd5c6f34945e2daa3abb547f81f5576facb (patch)
tree0bc943215f7f3c5fd997c7d996d498d805796405
parentef89af1f4380b922bdadd31c9e49829a022f55ae (diff)
clocksource: armada-370-xp: Add missing clock enable
This commit makes sure the timer clock is prepared and enabled before retrieving its rate. Acked-by: Jason Cooper <[email protected]> Acked-by: Gregory CLEMENT <[email protected]> Acked-by: Wim Van Sebroeck <[email protected]> Reviewed-by: Thomas Petazzoni <[email protected]> Tested-by: Thomas Petazzoni <[email protected]> Signed-off-by: Ezequiel Garcia <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]>
-rw-r--r--drivers/clocksource/time-armada-370-xp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clocksource/time-armada-370-xp.c b/drivers/clocksource/time-armada-370-xp.c
index 0451e62fac7a..d8555f9edc50 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;