From: Kevin Hao <haokexin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Mike Turquette <mturquette@linaro.org>,
Gerhard Sittig <gsi@denx.de>,
Yuantian Tang <Yuantian.Tang@freescale.com>,
Jingchang Lu <jingchang.lu@freescale.com>,
Scott Wood <scottwood@freescale.com>
Subject: [PATCH v3 2/3] powerpc: call of_clk_init() from time_init()
Date: Wed, 3 Dec 2014 16:53:52 +0800 [thread overview]
Message-ID: <1417596833-31456-3-git-send-email-haokexin@gmail.com> (raw)
In-Reply-To: <1417596833-31456-1-git-send-email-haokexin@gmail.com>
So the boards which has COMMON_CLK enabled don't have to
invoke this in its board specific file.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Acked-by: Michael Turquette <mturquette@linaro.org>
---
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
next prev parent reply other threads:[~2014-12-03 8:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-03 8:53 [PATCH v3 0/3] fix a kernel panic on fsl corenet board when CONFIG_CLK_PPC_CORENET is enabled Kevin Hao
2014-12-03 8:53 ` [PATCH v3 1/3] Revert "clk: ppc-corenet: Fix Section mismatch warning" Kevin Hao
2014-12-04 4:04 ` Scott Wood
2014-12-04 4:38 ` Kevin Hao
2014-12-04 4:46 ` Scott Wood
2014-12-04 6:06 ` Kevin Hao
2014-12-05 1:10 ` Scott Wood
2014-12-05 3:51 ` Scott Wood
2014-12-09 1:34 ` Kevin Hao
2015-01-17 19:32 ` Mike Turquette
2015-01-15 2:50 ` Yuantian Tang
2014-12-03 8:53 ` Kevin Hao [this message]
2014-12-03 8:53 ` [PATCH v3 3/3] clk: ppc-corenet: fix section mismatch warning Kevin Hao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417596833-31456-3-git-send-email-haokexin@gmail.com \
--to=haokexin@gmail.com \
--cc=Yuantian.Tang@freescale.com \
--cc=gsi@denx.de \
--cc=jingchang.lu@freescale.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mturquette@linaro.org \
--cc=scottwood@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).