From patchwork Fri Feb 22 17:17:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2176661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 3C0EF3FD4E for ; Fri, 22 Feb 2013 17:21:47 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U8wHL-0007Ym-PK; Fri, 22 Feb 2013 17:19:23 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U8wGe-0007P8-AB for linux-arm-kernel@lists.infradead.org; Fri, 22 Feb 2013 17:18:41 +0000 Received: from axis700.grange (dslb-178-001-229-135.pools.arcor-ip.net [178.1.229.135]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MTP5b-1UFr4e0UnH-00S5eB; Fri, 22 Feb 2013 18:18:19 +0100 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id 8CFAE40B9D; Fri, 22 Feb 2013 18:18:18 +0100 (CET) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1U8wGI-00072X-82; Fri, 22 Feb 2013 18:18:18 +0100 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Subject: [PATCH/RFC 3/4] ARM: shmobile: sh73a0: run sh73a0_clock_init() only once Date: Fri, 22 Feb 2013 18:17:53 +0100 Message-Id: <1361553474-27022-4-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1361553474-27022-1-git-send-email-g.liakhovetski@gmx.de> References: <1361553474-27022-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:1eOM95fwhfh14ELEr7RJc7K/wqbHmNQeD+O+IK/l7Xw meHm8yJYcGI/uf9t9/Qk17o/NjlcY55mo1T4Xh+exBG5aV19dQ MeG1KAPuPwGE5O+rBEvw+tlYn71xiUAh2xn3rgIvloWTgiG3Lp YLrG5YY8Ip45WK/l4K0F7tmFOX0y3c/3Ok2X85sXh7jfmdk+Mr diZgRkL8+PcAoH3SQSt3G5dL68cglZkKmU8/bMhoFHh3nfx/t+ 5rKkeRddlvk638V00c4DO5TffGc4s7E+oV24Nc1xWM0uYWFLlm mOCKBNysJ/6hikPM2homQOhVHO9fIe6NUnnLzrlfHlonEXXMOA ESsUNnFsHnIgANdIOV27JACp3nnWZxFUT0whqGwgNB3f6e3iB5 CH0JjIPsIZ0Sg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130222_121840_586275_01C53FBD X-CRM114-Status: GOOD ( 11.92 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.10 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (g.liakhovetski[at]gmx.de) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.7 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] Cc: Magnus Damm , cpufreq@vger.kernel.org, "Rafael J. Wysocki" , Simon Horman , Guennadi Liakhovetski , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org sh73a0_clock_init() is called from sh73a0_earlytimer_init() and sh73a0_add_standard_devices_dt(), take care to only run it once. Signed-off-by: Guennadi Liakhovetski --- This patch shouldn't be needed, sh73a0_clock_init() shouldn't be called twice. It's here only as an illustration, how I actually was testing. arch/arm/mach-shmobile/clock-sh73a0.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index 3170482..f9a015d 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c @@ -809,6 +809,9 @@ void __init sh73a0_clock_init(void) { int k, ret = 0; + if (main_clk.parent) + return; + /* Set SDHI clocks to a known state */ __raw_writel(0x108, SD0CKCR); __raw_writel(0x108, SD1CKCR);