]> git.karo-electronics.de Git - linux-beck.git/commitdiff
clocksource: armada-370-xp: Add missing clock enable
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Tue, 4 Nov 2014 13:21:31 +0000 (10:21 -0300)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 26 Nov 2014 12:51:07 +0000 (13:51 +0100)
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>
drivers/clocksource/time-armada-370-xp.c

index 0451e62fac7a8e31fd2bc370a83b4fdc4083bf01..d8555f9edc509ce9f203c1c517959a6fe6e33159 100644 (file)
@@ -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;