Thread (13 messages) 13 messages, 4 authors, 2015-01-17

[PATCH v3 2/3] powerpc: call of_clk_init() from time_init()

flat view
STALE4300d REVIEWED: 2 (0M)

From: Kevin Hao <hidden>
Date: 2014-12-03 08:56:11
Subsystem: linux for powerpc (32-bit and 64-bit), linux for powerpc embedded mpc5xxx, the rest · Maintainers: Madhavan Srinivasan, Anatolij Gustschin, Linus Torvalds

Status: Reviewed.

Revision v3 (3 revisions archived); 2 review trailers.

Revisions (3)
  1. v1
  2. v2 [diff against previous]
  3. v3 current [diff against previous]
So the boards which has COMMON_CLK enabled don't have to
invoke this in its board specific file.

Signed-off-by: Kevin Hao <redacted>
Acked-by: Scott Wood <redacted>
Acked-by: Michael Turquette <redacted>
---
v3: Add ack.

v2: A new patch in v2.

 arch/powerpc/kernel/time.c                    |  5 +++++
 arch/powerpc/platforms/512x/clock-commonclk.c | 11 +++++------
 2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index fa7c4f12104f..df9fa05b5fd3 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -54,6 +54,7 @@
 #include <linux/irq.h>
 #include <linux/delay.h>
 #include <linux/irq_work.h>
+#include <linux/clk-provider.h>
 #include <asm/trace.h>
 
 #include <asm/io.h>
@@ -943,6 +944,10 @@ void __init time_init(void)
 
 	init_decrementer_clockevent();
 	tick_setup_hrtimer_broadcast();
+
+#ifdef CONFIG_COMMON_CLK
+	of_clk_init(NULL);
+#endif
 }
 
 
diff --git a/arch/powerpc/platforms/512x/clock-commonclk.c b/arch/powerpc/platforms/512x/clock-commonclk.c
index 6eb614a271fb..f691bcabd710 100644
--- a/arch/powerpc/platforms/512x/clock-commonclk.c
+++ b/arch/powerpc/platforms/512x/clock-commonclk.c
@@ -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)
 {
 	struct device_node *clk_np;
@@ -1187,12 +1192,6 @@ int __init mpc5121_clk_init(void)
 	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
 	 * required yet no real clock is involved
 	 */
-- 
1.9.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help