From patchwork Sat Dec 14 11:47:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 3348291 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 190899F243 for ; Sat, 14 Dec 2013 11:48:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 309F920762 for ; Sat, 14 Dec 2013 11:48:52 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 36FC8206A9 for ; Sat, 14 Dec 2013 11:48:51 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vrnhq-0007lX-5j; Sat, 14 Dec 2013 11:48:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vrnhn-0001Ga-SO; Sat, 14 Dec 2013 11:48:23 +0000 Received: from mail-ee0-x22b.google.com ([2a00:1450:4013:c00::22b]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vrnhk-0001GG-6r for linux-arm-kernel@lists.infradead.org; Sat, 14 Dec 2013 11:48:21 +0000 Received: by mail-ee0-f43.google.com with SMTP id c13so1318355eek.30 for ; Sat, 14 Dec 2013 03:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=VWhX4j6AAmGe9BkG7aIgxc4AaiysxWQfWyw74XJSUtY=; b=0SAZzFZ9EK6I9M7Q5WlBMdoMz2j7iDR4G0y9OBWr2d9FyE87T705gMTXokQ02584Ct Qm3peKeQ6pu+0DGbWR3OnmaGGTmvlB5fG37evnczWR8KSRqq9VC6ddwxHLqfGRTkMByO pATkU3sDuBppuAa+TM0koZstN1wv8He4LckdzsL6nekde3Sk/BCeGUZUcNh5wm8MiM4V TfzQl+x4Ke+ID/+B7iPev4NDfoqjNOLNouNEnD8zb00R0JgZqer/MyME6O5E4Be0Ufyh 3tbWkqKaYNphZU9IOr1hAxhBModjrpdYcQfcFtwGHxMLLvkc0B2IPzJTWn2DlMxCEAnf 8FQQ== X-Received: by 10.14.108.134 with SMTP id q6mr7535193eeg.96.1387021676721; Sat, 14 Dec 2013 03:47:56 -0800 (PST) Received: from topkick.lan (dslc-082-083-251-183.pools.arcor-ip.net. [82.83.251.183]) by mx.google.com with ESMTPSA id a51sm17668910eeh.8.2013.12.14.03.47.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Dec 2013 03:47:55 -0800 (PST) Message-ID: <52AC4568.7030201@gmail.com> Date: Sat, 14 Dec 2013 12:47:52 +0100 From: Sebastian Hesselbarth User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 To: Arnd Bergmann , Tomasz Figa , Santosh Shilimkar , Jason Cooper , Andrew Lunn , Gregory Clement Subject: Re: [PATCH CRITICAL] ARM: s3c64xx: dt: Fix boot failure due to double clock initialization References: <1386964779-29457-1-git-send-email-tomasz.figa@gmail.com> <201312140400.16794.arnd@arndb.de> In-Reply-To: <201312140400.16794.arnd@arndb.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131214_064820_380136_FF5F6353 X-CRM114-Status: GOOD ( 21.10 ) X-Spam-Score: -2.0 (--) Cc: Olof Johansson , Kukjin Kim , linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, 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 On 12/14/2013 04:00 AM, Arnd Bergmann wrote: > On Friday 13 December 2013, Tomasz Figa wrote: >> Commit >> >> 4178bac ARM: call of_clk_init from default time_init handler >> >> added implicit call to of_clk_init() from default time_init callback, >> but it did not change platforms calling it from other callbacks, despite >> of not having custom time_init callbacks. This caused double clock >> initialization on such platforms, leading to boot failures. An example >> of such platform is mach-s3c64xx. >> >> This patch fixes boot failure on s3c64xx by dropping custom init_irq >> callback, which had a call to of_clk_init() and moving system reset >> initialization to init_machine callback. This allows us to have >> clocks initialized properly without a need to have custom init_time or >> init_irq callbacks. >> >> Signed-off-by: Tomasz Figa Thomas, thanks for catching this and sorry for the inconvenience. Either I simply missed s3c64xx or it went in with that global of_clk_init patch. > I see of_clk_init(NULL) getting called on two other ARM platforms: > > $ git grep -w of_clk_init arch/arm > arch/arm/kernel/time.c: of_clk_init(NULL); > arch/arm/mach-keystone/pm_domain.c: of_clk_init(NULL); > arch/arm/mach-mvebu/armada-370-xp.c: of_clk_init(NULL); > arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c: of_clk_init(NULL); > > Are the other two platforms ok here? mvebu is fine as long as it has its own .init_time callback (which it has). > I assume that mvebu is fine since Sebastian would have noticed breaking > that one and it has a custom init_time function, but keystone seems > broken in the same way as s3c64xx. Santosh, can you have a look? I also had a look at keystone and guess it is broken, too. of_clk_init(NULL) is called in keystone_pm_runtime_init() which is set as subsys_initcall. Simply removing the extra of_clk_init call in keystone_pm_runtime_init should be enough here: From 4ef4720c0d7ca9be57b06dc7ab1483c77a5ada1d Mon Sep 17 00:00:00 2001 From: Sebastian Hesselbarth Date: Sat, 14 Dec 2013 12:21:01 +0100 Subject: [PATCH] ARM: keystone: remove call to of_clk_init Commit 4178bac ARM: call of_clk_init from default time_init handler added implicit call to of_clk_init(NULL) from default time_init callback. This causes double clock initialization on keystone, leading to boot failures. This patch fixes boot failure on keystone by dropping the call to of_clk_init(NULL) in keystone_pm_runtime_init(), which is set as subsys_initcall and therefore called after arch-wide .init_time callback. Signed-off-by: Sebastian Hesselbarth --- arch/arm/mach-keystone/pm_domain.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/mach-keystone/pm_domain.c b/arch/arm/mach-keystone/pm_domain.c index 2962523..3f17e16 100644 --- a/arch/arm/mach-keystone/pm_domain.c +++ b/arch/arm/mach-keystone/pm_domain.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #ifdef CONFIG_PM_RUNTIME @@ -74,7 +73,6 @@ int __init keystone_pm_runtime_init(void) if (!np) return 0; - of_clk_init(NULL); pm_clk_add_notifier(&platform_bus_type, &platform_domain_notifier); return 0;