mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: <linux-snps-arc@lists.infradead.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Noam Camus <noamc@ezchip.com>,
	Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
	Rob Herring <robh@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Vineet Gupta <Vineet.Gupta1@synopsys.com>
Subject: [PATCH v2 4/9] ARC: clockevent: Prepare for DT based probe
Date: Tue, 8 Mar 2016 17:56:07 +0530	[thread overview]
Message-ID: <1457439972-20285-5-git-send-email-vgupta@synopsys.com> (raw)
In-Reply-To: <1457439972-20285-1-git-send-email-vgupta@synopsys.com>

From: Noam Camus <noamc@ezchip.com>

 - call clocksource_probe()
 - This in turns needs of_clk_init() to be called earlier

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Noam Camus <noamc@ezchip.com>
[vgupta: broken off from a bigger patch]
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
Changes v1 -> v2
 - Rebased on 4.5-rc6
 - Removed now not relevant header from setup.c

v1:
 - http://lists.infradead.org/pipermail/linux-snps-arc/2016-February/000448.html

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
 arch/arc/Kconfig        | 3 ++-
 arch/arc/kernel/setup.c | 2 --
 arch/arc/kernel/time.c  | 5 +++++
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 8a188bc1786a..74689dfde0ae 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -10,8 +10,9 @@ config ARC
 	def_bool y
 	select ARCH_SUPPORTS_ATOMIC_RMW if ARC_HAS_LLSC
 	select BUILDTIME_EXTABLE_SORT
-	select COMMON_CLK
+	select CLKSRC_OF
 	select CLONE_BACKWARDS
+	select COMMON_CLK
 	select GENERIC_ATOMIC64
 	select GENERIC_CLOCKEVENTS
 	select GENERIC_FIND_FIRST_BIT
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
index cdc821df1809..2dad49c71c09 100644
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -13,7 +13,6 @@
 #include <linux/console.h>
 #include <linux/module.h>
 #include <linux/cpu.h>
-#include <linux/clk-provider.h>
 #include <linux/of_fdt.h>
 #include <linux/of_platform.h>
 #include <linux/cache.h>
@@ -459,7 +458,6 @@ void __init setup_arch(char **cmdline_p)
 
 static int __init customize_machine(void)
 {
-	of_clk_init(NULL);
 	/*
 	 * Traverses flattened DeviceTree - registering platform devices
 	 * (if any) complete with their resources
diff --git a/arch/arc/kernel/time.c b/arch/arc/kernel/time.c
index e97be743d47b..848353a27ac8 100644
--- a/arch/arc/kernel/time.c
+++ b/arch/arc/kernel/time.c
@@ -34,6 +34,8 @@
 #include <linux/kernel.h>
 #include <linux/time.h>
 #include <linux/init.h>
+#include <linux/clk.h>
+#include <linux/clk-provider.h>
 #include <linux/clocksource.h>
 #include <linux/clockchips.h>
 #include <linux/cpu.h>
@@ -301,6 +303,9 @@ static void __init arc_clockevent_setup(void)
  */
 void __init time_init(void)
 {
+	of_clk_init(NULL);
+	clocksource_probe();
+
 	/*
 	 * sets up the timekeeping free-flowing counter which also returns
 	 * whether the counter is usable as clocksource
-- 
2.5.0

  parent reply	other threads:[~2016-03-08 12:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-08 12:26 [PATCH v2 0/9] ARC clockevent/clocksource modernization Vineet Gupta
2016-03-08 12:26 ` [PATCH v2 1/9] ARC: [dts] Add clk feeding into timers to DTs Vineet Gupta
2016-03-08 12:26 ` [PATCH v2 2/9] ARC: [dts] Introduce Timer bindings Vineet Gupta
2016-03-11  4:19   ` Vineet Gupta
2016-03-17 16:24   ` Rob Herring
2016-03-18  5:26     ` [PATCH v3] " Vineet Gupta
2016-03-20  0:42       ` Rob Herring
2016-03-21  5:02         ` Vineet Gupta
2016-03-08 12:26 ` [PATCH v2 3/9] ARC: clockevent: switch to cpu notifier for clockevent setup Vineet Gupta
2016-03-08 12:26 ` Vineet Gupta [this message]
2016-03-08 12:26 ` [PATCH v2 5/9] ARC: clockevent: DT based probe Vineet Gupta
2016-03-08 12:26 ` [PATCH v2 6/9] ARC: clocksource: " Vineet Gupta
2016-03-08 12:26 ` [PATCH v2 7/9] ARC: use fixed frequencies in arc_set_early_base_baud() Vineet Gupta
2016-03-08 13:56   ` christian.ruppert
2016-03-08 12:26 ` [PATCH v2 8/9] ARC: [plat-axs] Don't use arc_{get|set}_core_freq() for manipulating core clk Vineet Gupta
2016-03-08 12:26 ` [PATCH v2 9/9] ARC: RIP arc_{get|set}_core_freq() clk API Vineet Gupta

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=1457439972-20285-5-git-send-email-vgupta@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=noamc@ezchip.com \
    --cc=robh@kernel.org \
    /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

all inboxes | Powered by JetHome®