From patchwork Tue Mar 8 12:26:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 594111 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3E06F1402A1 for ; Tue, 8 Mar 2016 23:27:50 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1adGjr-0008NN-0N; Tue, 08 Mar 2016 12:27:47 +0000 Received: from us01smtprelay-2.synopsys.com ([198.182.47.9] helo=smtprelay.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1adGjn-0007yc-Dl for linux-snps-arc@lists.infradead.org; Tue, 08 Mar 2016 12:27:44 +0000 Received: from dc8secmta1.synopsys.com (dc8secmta1.synopsys.com [10.13.218.200]) by smtprelay.synopsys.com (Postfix) with ESMTP id 317B924E1402; Tue, 8 Mar 2016 04:27:24 -0800 (PST) Received: from dc8secmta1.internal.synopsys.com (dc8secmta1.internal.synopsys.com [127.0.0.1]) by dc8secmta1.internal.synopsys.com (Service) with ESMTP id 2616F27113; Tue, 8 Mar 2016 04:27:24 -0800 (PST) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by dc8secmta1.internal.synopsys.com (Service) with ESMTP id D6EB627102; Tue, 8 Mar 2016 04:27:23 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id BB3AE67C; Tue, 8 Mar 2016 04:27:23 -0800 (PST) Received: from us01wehtc1.internal.synopsys.com (us01wehtc1-vip.internal.synopsys.com [10.12.239.236]) by mailhost.synopsys.com (Postfix) with ESMTP id A9D4967A; Tue, 8 Mar 2016 04:27:23 -0800 (PST) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by us01wehtc1.internal.synopsys.com (10.12.239.235) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 8 Mar 2016 04:26:59 -0800 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 8 Mar 2016 17:56:56 +0530 Received: from vineet-E7440.internal.synopsys.com (10.12.197.157) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 8 Mar 2016 17:56:55 +0530 From: Vineet Gupta To: Subject: [PATCH v2 4/9] ARC: clockevent: Prepare for DT based probe Date: Tue, 8 Mar 2016 17:56:07 +0530 Message-ID: <1457439972-20285-5-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457439972-20285-1-git-send-email-vgupta@synopsys.com> References: <1457439972-20285-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 X-Originating-IP: [10.12.197.157] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160308_042743_552654_BB2F6BEE X-CRM114-Status: GOOD ( 11.42 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.47.9 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [198.182.47.9 listed in wl.mailspike.net] -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Alexey Brodkin , Vineet Gupta , Daniel Lezcano , lkml , Noam Camus Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Noam Camus - call clocksource_probe() - This in turns needs of_clk_init() to be called earlier Cc: Daniel Lezcano Signed-off-by: Noam Camus [vgupta: broken off from a bigger patch] Signed-off-by: Vineet Gupta --- 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 --- 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 #include #include -#include #include #include #include @@ -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 #include #include +#include +#include #include #include #include @@ -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