From: Robert Jarzmik <robert.jarzmik@free.fr>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>,
Andrew Lunn <andrew@lunn.ch>,
linux-arm-kernel@lists.infradead.org,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Daniel Mack <daniel@zonque.org>,
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 [thread overview]
Message-ID: <m2pmcteilg.fsf@sopl295-1.home> (raw)
In-Reply-To: <Y5I2oQexHNdlIbsQ@shell.armlinux.org.uk>
"Russell King (Oracle)" <linux@armlinux.org.uk> 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
WARNING: multiple messages have this Message-ID (diff)
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>,
Andrew Lunn <andrew@lunn.ch>,
linux-arm-kernel@lists.infradead.org,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Daniel Mack <daniel@zonque.org>,
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 [thread overview]
Message-ID: <m2pmcteilg.fsf@sopl295-1.home> (raw)
In-Reply-To: <Y5I2oQexHNdlIbsQ@shell.armlinux.org.uk>
"Russell King (Oracle)" <linux@armlinux.org.uk> 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
next prev parent reply other threads:[~2022-12-08 20:48 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-07 11:25 PXA25x: GPIO driver fails probe due to resource conflict with pinctrl driver Jonathan Neuschäfer
2022-12-07 11:25 ` Jonathan Neuschäfer
2022-12-07 15:28 ` Andrew Lunn
2022-12-07 15:28 ` Andrew Lunn
2022-12-07 15:41 ` Russell King (Oracle)
2022-12-07 15:41 ` Russell King (Oracle)
2022-12-07 16:44 ` Jonathan Neuschäfer
2022-12-07 16:44 ` Jonathan Neuschäfer
2022-12-07 18:27 ` Russell King (Oracle)
2022-12-07 18:27 ` Russell King (Oracle)
2022-12-08 18:36 ` Jonathan Neuschäfer
2022-12-08 18:36 ` Jonathan Neuschäfer
2022-12-08 18:46 ` Robert Jarzmik
2022-12-08 18:46 ` Robert Jarzmik
2022-12-08 19:10 ` Russell King (Oracle)
2022-12-08 19:10 ` Russell King (Oracle)
2022-12-08 20:19 ` Robert Jarzmik [this message]
2022-12-08 20:19 ` Robert Jarzmik
2022-12-08 21:53 ` Jonathan Neuschäfer
2022-12-08 21:53 ` Jonathan Neuschäfer
2022-12-08 22:29 ` Russell King (Oracle)
2022-12-08 22:29 ` Russell King (Oracle)
2022-12-09 8:55 ` Robert Jarzmik
2022-12-09 8:55 ` Robert Jarzmik
2022-12-07 16:40 ` Jonathan Neuschäfer
2022-12-07 16:40 ` Jonathan Neuschäfer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2pmcteilg.fsf@sopl295-1.home \
--to=robert.jarzmik@free.fr \
--cc=andrew@lunn.ch \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=j.neuschaefer@gmx.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.