Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753811Ab3IRR6R (ORCPT ); Wed, 18 Sep 2013 13:58:17 -0400 Received: from mail-bk0-f52.google.com ([209.85.214.52]:38097 "EHLO mail-bk0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752874Ab3IRRyO (ORCPT ); Wed, 18 Sep 2013 13:54:14 -0400 From: Sebastian Hesselbarth To: Sebastian Hesselbarth Cc: Olof Johansson , Arnd Bergmann , Russell King , STEricsson , linux-tegra@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, kernel@stlinux.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/26] ARM: call of_clk_init from default time_init handler Date: Wed, 18 Sep 2013 19:53:42 +0200 Message-Id: <1379526839-14798-10-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1379526839-14798-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1379526839-14798-1-git-send-email-sebastian.hesselbarth@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2928 Lines: 94 Most DT ARM machs require common clock providers initialized before timers. Currently, arch/arm machs use .init_time to call of_clk_init right before clocksource_of_init. This prevents to remove that callback and use the default one instead. This patch adds a call to of_clk_init() to the default .init_time callback to allow to remove custom callbacks where applicable. While at it, also reorder includes alphabetically. Signed-off-by: Sebastian Hesselbarth --- Changelog: RFCv2->v1: - only call of_clk_init(NULL) when no custom .init_time is set (Suggested by Soeren Brinkmann) RFCv1->RFCv2: - reorder includes alphabetically Cc: Olof Johansson Cc: Arnd Bergmann Cc: Russell King Cc: STEricsson Cc: linux-tegra@vger.kernel.org Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: kernel@stlinux.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/kernel/time.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 98aee32..bc0468b 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -11,25 +11,26 @@ * This file contains the ARM-specific time handling details: * reading the RTC at bootup, etc... */ +#include +#include +#include #include -#include -#include -#include #include +#include +#include +#include +#include #include +#include #include +#include #include -#include -#include #include -#include -#include -#include -#include -#include #include #include +#include +#include #if defined(CONFIG_RTC_DRV_CMOS) || defined(CONFIG_RTC_DRV_CMOS_MODULE) || \ defined(CONFIG_NVRAM) || defined(CONFIG_NVRAM_MODULE) @@ -116,8 +117,10 @@ int __init register_persistent_clock(clock_access_fn read_boot, void __init time_init(void) { - if (machine_desc->init_time) + if (machine_desc->init_time) { machine_desc->init_time(); - else + } else { + of_clk_init(NULL); clocksource_of_init(); + } } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/