From patchwork Thu Feb 12 17:45:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 5821161 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4AD609F3CA for ; Thu, 12 Feb 2015 17:50:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89C5D20254 for ; Thu, 12 Feb 2015 17:50:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B85F32022A for ; Thu, 12 Feb 2015 17:50:05 +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 1YLxrb-0004xl-1S; Thu, 12 Feb 2015 17:47:43 +0000 Received: from mail-wg0-x241.google.com ([2a00:1450:400c:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YLxqd-0004Tm-CM for linux-arm-kernel@lists.infradead.org; Thu, 12 Feb 2015 17:46:44 +0000 Received: by mail-wg0-f65.google.com with SMTP id k14so2444752wgh.0 for ; Thu, 12 Feb 2015 09:46:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:in-reply-to:references; bh=dUBO7CvPmIwtXFh5pjumHnPf6LvFlLATiaJvsW+bBBA=; b=y52kUgxPPHr47j2hlHIs1ggLKmqWes0HkuKaxrRueD9Tn9XvG1jZTSdeUt+zATRTA+ 2/Gcs1q3JJyVcKTqmRnfrL4L+Iw0hZ14aMeaWcn/xdMFoVicpUwBFV7tffiT4KHRgLDM qMaBCYaZAN/3I2Ct7A982WdttQbFJiRDw2h5bxrkupfEhxLzItrSkeBkOqY3+0b3RoRx n2zUIGTTylu2SQDL+hVR9W129YGlaqVK8zWzQDL3ovZr6TswvAJPG2zd24IWfB7OhkhT YsHiJfzN2xM2yBB1ZECjfRuPBbiPY9EJd2azRFE0ViV+vPTHGnnMaki/Ih4TCJa2WOMI 7hKw== X-Received: by 10.180.35.42 with SMTP id e10mr8513595wij.11.1423763185974; Thu, 12 Feb 2015 09:46:25 -0800 (PST) Received: from lmecul0520.st.com. (157.162.113.78.rev.sfr.net. [78.113.162.157]) by mx.google.com with ESMTPSA id ka1sm6614924wjc.2.2015.02.12.09.46.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Feb 2015 09:46:25 -0800 (PST) From: Maxime Coquelin To: Jonathan Corbet , Maxime Coquelin , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Philipp Zabel , Russell King , Daniel Lezcano , Thomas Gleixner , Linus Walleij , Greg Kroah-Hartman , Jiri Slaby , Arnd Bergmann , Andrew Morton , "David S. Miller" , Mauro Carvalho Chehab , Joe Perches , Antti Palosaari , Tejun Heo , Will Deacon , Nikolay Borisov , Rusty Russell , Kees Cook , Michal Marek , linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-serial@vger.kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org Subject: [PATCH 05/14] ARM: call reset_controller_of_init from default time_init handler Date: Thu, 12 Feb 2015 18:45:55 +0100 Message-Id: <1423763164-5606-6-git-send-email-mcoquelin.stm32@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423763164-5606-1-git-send-email-mcoquelin.stm32@gmail.com> References: <1423763164-5606-1-git-send-email-mcoquelin.stm32@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150212_094643_579621_A6350F36 X-CRM114-Status: GOOD ( 12.00 ) X-Spam-Score: -0.6 (/) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Some DT ARM platforms need the reset controllers to be initialized before the timers. This is the case of the stm32 and sunxi platforms. This patch adds a call to reset_controller_of_init() to the default .init_time callback when RESET_CONTROLLER is used by the platform. Signed-off-by: Maxime Coquelin --- arch/arm/kernel/time.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 0cc7e58..4601b1e 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -117,6 +118,9 @@ void __init time_init(void) if (machine_desc->init_time) { machine_desc->init_time(); } else { +#ifdef CONFIG_RESET_CONTROLLER + reset_controller_of_init(); +#endif #ifdef CONFIG_COMMON_CLK of_clk_init(NULL); #endif