From patchwork Sat May 28 08:24:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 9139157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7C6E160759 for ; Sat, 28 May 2016 08:27:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6138F28138 for ; Sat, 28 May 2016 08:27:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 558532819C; Sat, 28 May 2016 08:27:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0CB3428138 for ; Sat, 28 May 2016 08:27:13 +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 1b6ZYF-0000Lm-HO; Sat, 28 May 2016 08:24:55 +0000 Received: from smtp06.smtpout.orange.fr ([80.12.242.128] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b6ZYB-0000JU-QZ for linux-arm-kernel@lists.infradead.org; Sat, 28 May 2016 08:24:53 +0000 Received: from belgarion ([92.149.56.180]) by mwinf5d64 with ME id zkQT1s0053tJAsC03kQTNy; Sat, 28 May 2016 10:24:28 +0200 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Sat, 28 May 2016 10:24:28 +0200 X-ME-IP: 92.149.56.180 From: Robert Jarzmik To: Guenter Roeck Subject: Re: pxa_defconfig runtime failures due to 'ARM: pxa: activate pinctrl for device-tree machines' References: <20160527202715.GA4841@roeck-us.net> X-URL: http://belgarath.falguerolles.org/ Date: Sat, 28 May 2016 10:24:27 +0200 In-Reply-To: <20160527202715.GA4841@roeck-us.net> (Guenter Roeck's message of "Fri, 27 May 2016 13:27:15 -0700") Message-ID: <87a8jah9ok.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160528_012452_373378_A9D7B3DD X-CRM114-Status: GOOD ( 18.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Guenter Roeck writes: > Hi, > > your mainline commit f806dac5938b ("ARM: pxa: activate pinctrl for device-tree > machines") causes various non-devicetree systems to fail with the following > error messages when running a pxa_defconfig image. Ah yes, you're right. > > During boot: > > Can't request reset_gpio > > At reboot: > > reboot: Restarting system > ------------[ cut here ]------------ > kernel BUG at arch/arm/mach-pxa/reset.c:59! > ... > > Added logging shows that the error seen when trying to request the reset gpio > is -EPROBE_DEFER, and that the pxa gpio driver is not instantiated. > > This is seen when attempting to run akita, borzoi, spitz, terrier, or tosa > in qemu with pxa_defconfig. Reverting your patch fixes the problem. > > Is this on purpose ? Well no :) The real reason behind is that gpio handling for pxa in its current state cannot be built for _both_ a devicetree machine (ie. pxa-dt.c) and a non devicetree machine (ie. corgi, tosa, ...). This is turn is because for devicetree a pinctrl is enforced for the machine, and a pinctrl driver is required. If it's not available, pxa_gpio_request() fails on pinctrl_request_gpio() and returns -EPROBE_DEFER. Now the true chicken and egg problem is than machine files, ie. arch/arm/mach-pxa/xxx.c are using gpio before the drivers are probed, in the init_machine() function, and that's why pinctrl/gpio for legacy machine files is a bit difficult. > Unless I am missing something, it effectively means that > pxa_defconfig no longer works for pxa3xx systems, since those do not support > devicetree (or at least there is no devicetree file which includes > pxa3xx.dtsi). I'd rather say that pxa_defconfig doesn't work anymore on any legacy system. Its first purpose was to ensure compilation coverage of all legacy pxa systems. Its second one was to have a single kernel bootable on all legacy pxa systems. Therefore, would you tell me if the patch in [1] fixes your issue ? Cheers. diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig index dc5517eaf09f..a016ecc0084b 100644 --- a/arch/arm/configs/pxa_defconfig +++ b/arch/arm/configs/pxa_defconfig @@ -26,8 +26,6 @@ CONFIG_PARTITION_ADVANCED=y CONFIG_LDM_PARTITION=y CONFIG_CMDLINE_PARTITION=y CONFIG_ARCH_PXA=y -CONFIG_MACH_PXA27X_DT=y -CONFIG_MACH_PXA3XX_DT=y CONFIG_ARCH_LUBBOCK=y CONFIG_MACH_MAINSTONE=y CONFIG_MACH_ZYLONITE300=y