Most DT ARM machs require common clock providers initialized before timers.
Currently, arch/arm machs use .init_time to call clk_of_init right before
clocksource_of_init. This prevents to remove that hook and use the default
hook instead. clk_of_init now checks for multiple calls to it, so add
the call to ARM arch time_init by default.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselba...@gmail.com>
---
Cc: Mike Turquette <mturque...@linaro.org> 
Cc: Russell King <li...@arm.linux.org.uk>
Cc: Arnd Bergmann <a...@arndb.de>
Cc: linux-arm-ker...@lists.infradead.org 
Cc: linux-kernel@vger.kernel.org 
---
 arch/arm/kernel/time.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index 98aee32..94b51b8 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -22,6 +22,7 @@
 #include <linux/errno.h>
 #include <linux/profile.h>
 #include <linux/timer.h>
+#include <linux/clk-provider.h>
 #include <linux/clocksource.h>
 #include <linux/irq.h>
 #include <linux/sched_clock.h>
@@ -116,6 +117,9 @@ int __init register_persistent_clock(clock_access_fn 
read_boot,
 
 void __init time_init(void)
 {
+       /* initalize common clocks before timers */
+       of_clk_init(NULL);
+
        if (machine_desc->init_time)
                machine_desc->init_time();
        else
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to