From patchwork Wed Sep 18 17:53:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 2908411 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CAAABBFF05 for ; Wed, 18 Sep 2013 17:59:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9928203B4 for ; Wed, 18 Sep 2013 17:59:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D9BB203AF for ; Wed, 18 Sep 2013 17:59:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753736Ab3IRR6J (ORCPT ); Wed, 18 Sep 2013 13:58:09 -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 Received: by mail-bk0-f52.google.com with SMTP id e11so3020605bkh.11 for ; Wed, 18 Sep 2013 10:54:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7si81eRitmv56GF3LUltc/1HKZ4G8D+7fKP3xN8FmVA=; b=WpTwRNOEqxFvxBPUdWD8G6tS7Y191Ia3zVqCjxosBFjTfn07MdeK0nEklmtSSi6yqt n4RIGA+tXwbiLaz9+MQ5Drk2vM3TPylhnfzM3+KtyUcXjbFyXce8nwEFwy12iJKqCsOf s2o72Wlz000UfplAYTWGjG2sZTLS2lqSnAX8431pS49GEEfNYeOSQm6KtmZVr451PYU8 DOhX0x35XRc8fw/J24INv5Thi26jQ8Y+NG8PCAtH+7HYK4cEug6N+h/fGozcEYxNH+Ay vrfR8CuwSvI5k6gBAOrKGLyg/ZXC4nHSVB+brh8BX2ZoyB/1r8ukKgKPeg6r/X1hvXy4 baeg== X-Received: by 10.205.65.78 with SMTP id xl14mr35219828bkb.1.1379526852885; Wed, 18 Sep 2013 10:54:12 -0700 (PDT) Received: from topkick.lan (dslc-082-083-247-252.pools.arcor-ip.net. [82.83.247.252]) by mx.google.com with ESMTPSA id pn6sm1440822bkb.14.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 10:54:12 -0700 (PDT) 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-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 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(); + } }