Message ID | 20220304144432.3397621-2-horatiu.vultur@microchip.com |
---|---|
State | New |
Headers | show |
Series | pinctrl: ocelot: Add fixes for ocelot driver | expand |
> The pincfg resources are in the second memory resource. But the driver > still tries to access the first memory resource to get the pincfg. This > is wrong therefore fix to access the second memory resource. > > Reviewed-by: Colin Foster <colin.foster@in-advantage.com> > Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call") > Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> There is already this patch pending, which does exactly the same: https://lore.kernel.org/linux-gpio/20220216082020.981797-1-michael@walle.cc/ FWIW, there is also this one: https://lore.kernel.org/linux-gpio/20220216122727.1005041-1-michael@walle.cc/ -michael
The 03/07/2022 13:45, Michael Walle wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > > The pincfg resources are in the second memory resource. But the driver > > still tries to access the first memory resource to get the pincfg. This > > is wrong therefore fix to access the second memory resource. > > > > Reviewed-by: Colin Foster <colin.foster@in-advantage.com> > > Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call") > > Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> > > There is already this patch pending, which does exactly > the same: > https://lore.kernel.org/linux-gpio/20220216082020.981797-1-michael@walle.cc/ Sorry, I have missed your patch. Should I resend this series where I will drop this patch? What is the correct approach? > > FWIW, there is also this one: > https://lore.kernel.org/linux-gpio/20220216122727.1005041-1-michael@walle.cc/ > > -michael
Am 2022-03-08 09:30, schrieb Horatiu Vultur: > The 03/07/2022 13:45, Michael Walle wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know >> the content is safe >> >> > The pincfg resources are in the second memory resource. But the driver >> > still tries to access the first memory resource to get the pincfg. This >> > is wrong therefore fix to access the second memory resource. >> > >> > Reviewed-by: Colin Foster <colin.foster@in-advantage.com> >> > Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call") >> > Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> >> >> There is already this patch pending, which does exactly >> the same: >> https://lore.kernel.org/linux-gpio/20220216082020.981797-1-michael@walle.cc/ > > Sorry, I have missed your patch. > Should I resend this series where I will drop this patch? What is the > correct approach? Actually, I don't know. Maybe you don't need to do anything, Linus? -michael
On Tue, Mar 8, 2022 at 9:32 AM Michael Walle <michael@walle.cc> wrote: > Am 2022-03-08 09:30, schrieb Horatiu Vultur: > > The 03/07/2022 13:45, Michael Walle wrote: > >> EXTERNAL EMAIL: Do not click links or open attachments unless you know > >> the content is safe > >> > >> > The pincfg resources are in the second memory resource. But the driver > >> > still tries to access the first memory resource to get the pincfg. This > >> > is wrong therefore fix to access the second memory resource. > >> > > >> > Reviewed-by: Colin Foster <colin.foster@in-advantage.com> > >> > Fixes: ad96111e658a95 ("pinctrl: ocelot: combine get resource and ioremap into single call") > >> > Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com> > >> > >> There is already this patch pending, which does exactly > >> the same: > >> https://lore.kernel.org/linux-gpio/20220216082020.981797-1-michael@walle.cc/ > > > > Sorry, I have missed your patch. > > Should I resend this series where I will drop this patch? What is the > > correct approach? > > Actually, I don't know. Maybe you don't need to do anything, Linus? I'll just apply 2/2 if applicable. Yours, Linus Walleij
diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index 685c79e08d40..a859fbcb09af 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1892,7 +1892,7 @@ static struct regmap *ocelot_pinctrl_create_pincfg(struct platform_device *pdev) .max_register = 32, }; - base = devm_platform_ioremap_resource(pdev, 0); + base = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(base)) { dev_dbg(&pdev->dev, "Failed to ioremap config registers (no extended pinconf)\n"); return NULL;