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: 2176601 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9F9B4400ED for ; Fri, 22 Feb 2013 17:18:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758671Ab3BVRSf (ORCPT ); Fri, 22 Feb 2013 12:18:35 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:54266 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758652Ab3BVRS3 (ORCPT ); Fri, 22 Feb 2013 12:18:29 -0500 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 Cc: Magnus Damm , Simon Horman , linux-arm-kernel@lists.infradead.org, "Rafael J. Wysocki" , cpufreq@vger.kernel.org, Guennadi Liakhovetski 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== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.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);