From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751479AbcE1VRI (ORCPT ); Sat, 28 May 2016 17:17:08 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:34851 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750882AbcE1VRG (ORCPT ); Sat, 28 May 2016 17:17:06 -0400 Subject: Re: pxa_defconfig runtime failures due to 'ARM: pxa: activate pinctrl for device-tree machines' To: Robert Jarzmik References: <20160527202715.GA4841@roeck-us.net> <87a8jah9ok.fsf@belgarion.home> Cc: Linus Walleij , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org From: Guenter Roeck Message-ID: <574A0AD1.9000304@roeck-us.net> Date: Sat, 28 May 2016 14:17:05 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <87a8jah9ok.fsf@belgarion.home> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/28/2016 01:24 AM, Robert Jarzmik wrote: > 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 ? > Yes, it does. It is actually the workaround I deployed for my test builds, since I thought that the change was on purpose. Thanks, Guenter