From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B6BAC001B2 for ; Thu, 8 Dec 2022 20:48:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-reply-to:Date:Subject:Cc: To:From:References:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QhjNgsrbW/vYGi8CsjfEkFV7OP2E1wBBcw0GGBP6BvQ=; b=H7t9bg4J1KUdKGDLiZh5fCcOru 1eju1sAhiOnfD5DPptHpOX8lasVqEKRkeUD2vVtOW0zqFAkz5gboKyjjCjYj/xYhkEsE7aWbugGlz tCi8cbIpFbSRB6JdpEFFvmY/NSoJ2RBYtoLFa8jrwhGnhnqZRMHUDvxbbQvfjmf6lq0akmQPGMyLr 9eAu6UA21fl8TenOcKWhwTwRWQG0T1/ErccOLzMh91Wqor4No8nBuErMwbywB2YT01ywSK/lnchTu 9Q9YLke+havUUbWAI0uAFzzSwdx3O8X6Czm6yP4J7iWaaxi2/yonCTWj1NSAb9zOyIE9w99V/ZVWV YlMc17eA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Nn5-00AuqQ-Ln; Thu, 08 Dec 2022 20:46:48 +0000 Received: from smtp1-g21.free.fr ([212.27.42.1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3Nfc-00Apqy-Dw for linux-arm-kernel@lists.infradead.org; Thu, 08 Dec 2022 20:39:06 +0000 Received: from sopl295-1.home (unknown [IPv6:2a01:cb19:8d70:d500:6d47:7868:523:4848]) (Authenticated sender: robert.jarzmik@free.fr) by smtp1-g21.free.fr (Postfix) with ESMTPSA id CFD18B00571; Thu, 8 Dec 2022 21:38:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1670531940; bh=YstTq1Myiif2EgThZ1/Ik29o/fO83gS7mbfHozyghFU=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=JVo2uzx7wkukQqGB/tORaLKiG+VvWQYfEUqaYh0iaYlC9MpVCfoTUkf4GAMP6rhFc TcvZt7ZD5EFlVm6fnXv6lgt6d11JQGRAXx2LAB2Vk/d3hj8PJDo0rzpK3Mz61lGeGk ehNIg/yOTycYsl18/3HC/+hxVQ4e5An1aLiDtS985aflFhOmWAttjR3EnAHgwIJ71u WtEfVNBiPqhO5Hz3gU05LK9oL13FOKJmDtVru/edrI8GjM24J8Dcr+zWIR1LdAuLGH jJFgRMNNoQwalTtZ2MHSqUZFH7wFTCihbvmcfkB8jBIS/nBJ+7WYnuNko9/WH8pWPu VT44TsUBnhitw== References: User-agent: mu4e 1.8.11; emacs 28.1 From: Robert Jarzmik To: "Russell King (Oracle)" , Jonathan =?utf-8?Q?Ne?= =?utf-8?Q?usch=C3=A4fer?= Cc: Robert Jarzmik , Andrew Lunn , linux-arm-kernel@lists.infradead.org, Haojian Zhuang , Daniel Mack , linux-kernel@vger.kernel.org Subject: Re: PXA25x: GPIO driver fails probe due to resource conflict with pinctrl driver Date: Thu, 08 Dec 2022 21:19:12 +0100 In-reply-to: Message-ID: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221208_123904_655918_9A7C2D46 X-CRM114-Status: GOOD ( 15.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org "Russell King (Oracle)" writes: > From a quick look, I think this commit is to blame: > > 542c25b7a209 drivers: gpio: pxa: use > devm_platform_ioremap_resource() > > Someone "helpfully" making this change: > > - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - if (!res) > - return -EINVAL; > - gpio_reg_base = devm_ioremap(&pdev->dev, res->start, > - resource_size(res)); > + > + gpio_reg_base = devm_platform_ioremap_resource(pdev, 0); > > which introduces request_mem_region() to the PXA GPIO driver, > resulting > in this resource clash. You're right. Now, as for Jonathan, there are 2 options : - first one : revert the patch Russell pointed out - second one : a lot of work, detailed below : Given that Arnd is removing legacy platformdata code, that will only leave the device-tree one, which works only with the pinctrl driver enabled. That gives the opportunity to drop the use of GPDR from the gpio-pxa driver, and now we can map with separate iomem ressources pinctrl-pxa and gpio-pxa. Therefore, if Jonathan has the will to make a patch, I would : - keep the patch identfied by Russell (ie. don't revert it) - amend the device-tree descriptions for pxa - pxa2xx.dtsi ... gpio: gpio@40e00000 { ... reg = <0x40e00000 0xc>, <0x40e00018 0x3c>, <0x40e00100 4>, <0x40e00118 0x34>; - amend the gpio_pxa.c driver, to map the 4 regions (and not only one as before) - the pinctrl-pxa25.c and its device-tree are already mapping the holes in the previous list - check that I didn't mess up the 4 iomem regions, they should overlap with "pinctrl: pinctrl@40e00000". Well it's up to Jonathan to see which version he prefers to choose, the simple one or the tedious one. Cheers. -- Robert _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel