From patchwork Tue Oct 6 17:02:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 7337951 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4235EBEEA4 for ; Tue, 6 Oct 2015 17:06:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7471C2051D for ; Tue, 6 Oct 2015 17:06:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4EBCF20785 for ; Tue, 6 Oct 2015 17:06:21 +0000 (UTC) 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 1ZjVdg-00065c-0r; Tue, 06 Oct 2015 17:02:56 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZjVdT-0005to-Rn for linux-arm-kernel@lists.infradead.org; Tue, 06 Oct 2015 17:02:44 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id t96H2IKl001420; Tue, 6 Oct 2015 12:02:18 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t96H2IU2002600; Tue, 6 Oct 2015 12:02:18 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Tue, 6 Oct 2015 12:02:19 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t96H2HP2006429; Tue, 6 Oct 2015 12:02:18 -0500 From: Felipe Balbi To: Tony Lindgren Subject: [PATCH 06/11] arm: omap2: timer: always call clocksource_of_init() when DT Date: Tue, 6 Oct 2015 12:02:02 -0500 Message-ID: <1444150927-14771-7-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.5.3 In-Reply-To: <1444150927-14771-1-git-send-email-balbi@ti.com> References: <1444150927-14771-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151006_100243_996241_6513E127 X-CRM114-Status: GOOD ( 10.83 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: daniel.lezcano@linaro.org, Linux Kernel Mailing List , Felipe Balbi , tglx@linutronix.de, Linux OMAP Mailing List , Linux ARM Kernel Mailing List Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If booting with DT, let's make sure to always call clocksource_of_init() as this will make it easier to move timer code to drivers/clocksource in the future. Signed-off-by: Felipe Balbi --- arch/arm/mach-omap2/timer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index dcc0f032e717..b523426f38a5 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -496,6 +496,9 @@ void __init omap_sync32k_timer_init(void) { __omap_sync32k_timer_init(1, "timer_32k_ck", "ti,timer-alwon", 2, "timer_sys_ck", NULL, false); + + if (of_have_populated_dt()) + clocksource_of_init(); } #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM43XX) @@ -519,7 +522,6 @@ void __init omap3_gptimer_timer_init(void) void __init omap4_local_timer_init(void) { omap_sync32k_timer_init(); - clocksource_of_init(); } #endif @@ -640,10 +642,8 @@ sysclk1_based: void __init omap5_realtime_timer_init(void) { - omap_sync32k_timer_init(); realtime_counter_init(); - - clocksource_of_init(); + omap_sync32k_timer_init(); } #endif /* CONFIG_SOC_OMAP5 || CONFIG_SOC_DRA7XX */