diff options
author | Ezequiel Garcia <ezequiel.garcia@free-electrons.com> | 2014-11-04 08:21:31 -0500 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2014-11-26 07:51:07 -0500 |
commit | 551f2fd5c6f34945e2daa3abb547f81f5576facb (patch) | |
tree | 0bc943215f7f3c5fd997c7d996d498d805796405 /drivers/clocksource | |
parent | ef89af1f4380b922bdadd31c9e49829a022f55ae (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 <jason@lakedaemon.net>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Acked-by: Wim Van Sebroeck <wim@iguana.be>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r-- | drivers/clocksource/time-armada-370-xp.c | 2 |
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) | |||
293 | 293 | ||
294 | /* The 25Mhz fixed clock is mandatory, and must always be available */ | 294 | /* The 25Mhz fixed clock is mandatory, and must always be available */ |
295 | BUG_ON(IS_ERR(clk)); | 295 | BUG_ON(IS_ERR(clk)); |
296 | clk_prepare_enable(clk); | ||
296 | timer_clk = clk_get_rate(clk); | 297 | timer_clk = clk_get_rate(clk); |
297 | 298 | ||
298 | armada_370_xp_timer_common_init(np); | 299 | armada_370_xp_timer_common_init(np); |
@@ -305,6 +306,7 @@ static void __init armada_370_timer_init(struct device_node *np) | |||
305 | struct clk *clk = of_clk_get(np, 0); | 306 | struct clk *clk = of_clk_get(np, 0); |
306 | 307 | ||
307 | BUG_ON(IS_ERR(clk)); | 308 | BUG_ON(IS_ERR(clk)); |
309 | clk_prepare_enable(clk); | ||
308 | timer_clk = clk_get_rate(clk) / TIMER_DIVIDER; | 310 | timer_clk = clk_get_rate(clk) / TIMER_DIVIDER; |
309 | timer25Mhz = false; | 311 | timer25Mhz = false; |
310 | 312 | ||