Commit f0d37300 authored by Kevin Hao's avatar Kevin Hao Committed by Michael Turquette

powerpc: call of_clk_init() from time_init()

So the boards which has COMMON_CLK enabled don't have to
invoke this in its board specific file.
Signed-off-by: default avatarKevin Hao <haokexin@gmail.com>
Acked-by: default avatarScott Wood <scottwood@freescale.com>
Acked-by: default avatarMichael Turquette <mturquette@linaro.org>
Signed-off-by: default avatarMichael Turquette <mturquette@linaro.org>
parent 27c76c43
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/irq_work.h> #include <linux/irq_work.h>
#include <linux/clk-provider.h>
#include <asm/trace.h> #include <asm/trace.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -943,6 +944,10 @@ void __init time_init(void) ...@@ -943,6 +944,10 @@ void __init time_init(void)
init_decrementer_clockevent(); init_decrementer_clockevent();
tick_setup_hrtimer_broadcast(); tick_setup_hrtimer_broadcast();
#ifdef CONFIG_COMMON_CLK
of_clk_init(NULL);
#endif
} }
......
...@@ -1168,6 +1168,11 @@ static void mpc5121_clk_provide_backwards_compat(void) ...@@ -1168,6 +1168,11 @@ static void mpc5121_clk_provide_backwards_compat(void)
} }
} }
/*
* The "fixed-clock" nodes (which includes the oscillator node if the board's
* DT provides one) has already been scanned by the of_clk_init() in
* time_init().
*/
int __init mpc5121_clk_init(void) int __init mpc5121_clk_init(void)
{ {
struct device_node *clk_np; struct device_node *clk_np;
...@@ -1186,12 +1191,6 @@ int __init mpc5121_clk_init(void) ...@@ -1186,12 +1191,6 @@ int __init mpc5121_clk_init(void)
/* invalidate all not yet registered clock slots */ /* invalidate all not yet registered clock slots */
mpc512x_clk_preset_data(); mpc512x_clk_preset_data();
/*
* have the device tree scanned for "fixed-clock" nodes (which
* includes the oscillator node if the board's DT provides one)
*/
of_clk_init(NULL);
/* /*
* add a dummy clock for those situations where a clock spec is * add a dummy clock for those situations where a clock spec is
* required yet no real clock is involved * required yet no real clock is involved
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment