* Re: [PATCH] PCI: layerscape: fix index passed to syscon_regmap_lookup_by_phandle_args
2025-03-27 15:19 [PATCH] PCI: layerscape: fix index passed to syscon_regmap_lookup_by_phandle_args Ioana Ciornei
@ 2025-03-27 15:30 ` Krzysztof Kozlowski
2025-03-27 15:32 ` Roy Zang
2025-03-27 15:35 ` Frank Li
2025-03-27 17:55 ` Bjorn Helgaas
2 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2025-03-27 15:30 UTC (permalink / raw)
To: Ioana Ciornei, Roy Zang, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Frank Li, linux-pci
Cc: imx, linux-kernel
On 27/03/2025 16:19, Ioana Ciornei wrote:
> The arg_count variable passed to the
> syscon_regmap_lookup_by_phandle_args() function represents the number of
> argument cells following the phandle. In this case, the number of
> arguments should be 1 instead of 2 since the dt property looks like
> below.
> fsl,pcie-scfg = <&scfg 0>;
>
> Without this fix, layerscape-pcie fails with the following message on
> LS1043A:
>
> [ 0.157041] OF: /soc/pcie@3500000: phandle scfg@1570000 needs 2, found 1
> [ 0.157050] layerscape-pcie 3500000.pcie: No syscfg phandle specified
> [ 0.157053] layerscape-pcie 3500000.pcie: probe with driver layerscape-pcie failed with error -22
>
> Fixes: 149fc35734e5 ("PCI: layerscape: Use syscon_regmap_lookup_by_phandle_args")
Uh, obviously, probably I thought the code is using
of_property_read_u32_index(), but that's of_property_read_u32_array().
Thanks.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: [PATCH] PCI: layerscape: fix index passed to syscon_regmap_lookup_by_phandle_args
2025-03-27 15:30 ` Krzysztof Kozlowski
@ 2025-03-27 15:32 ` Roy Zang
0 siblings, 0 replies; 6+ messages in thread
From: Roy Zang @ 2025-03-27 15:32 UTC (permalink / raw)
To: Krzysztof Kozlowski, Ioana Ciornei, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Bjorn Helgaas, Frank Li, linux-pci@vger.kernel.org
Cc: imx@lists.linux.dev, linux-kernel@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 1190 bytes --]
> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> On 27/03/2025 16:19, Ioana Ciornei wrote:
> > The arg_count variable passed to the
> > syscon_regmap_lookup_by_phandle_args() function represents the number
> > of argument cells following the phandle. In this case, the number of
> > arguments should be 1 instead of 2 since the dt property looks like
> > below.
> > fsl,pcie-scfg = <&scfg 0>;
> >
> > Without this fix, layerscape-pcie fails with the following message on
> > LS1043A:
> >
> > [ 0.157041] OF: /soc/pcie@3500000: phandle scfg@1570000 needs 2,
> found 1
> > [ 0.157050] layerscape-pcie 3500000.pcie: No syscfg phandle specified
> > [ 0.157053] layerscape-pcie 3500000.pcie: probe with driver layerscape-
> pcie failed with error -22
> >
> > Fixes: 149fc35734e5 ("PCI: layerscape: Use
> > syscon_regmap_lookup_by_phandle_args")
>
> Uh, obviously, probably I thought the code is using
> of_property_read_u32_index(), but that's of_property_read_u32_array().
>
> Thanks.
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Thank you Ioana for the quick patch fix.
Acked-by: Roy Zang <Roy.Zang@nxp.com>
Roy
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 9794 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] PCI: layerscape: fix index passed to syscon_regmap_lookup_by_phandle_args
2025-03-27 15:19 [PATCH] PCI: layerscape: fix index passed to syscon_regmap_lookup_by_phandle_args Ioana Ciornei
2025-03-27 15:30 ` Krzysztof Kozlowski
@ 2025-03-27 15:35 ` Frank Li
2025-03-27 17:55 ` Bjorn Helgaas
2 siblings, 0 replies; 6+ messages in thread
From: Frank Li @ 2025-03-27 15:35 UTC (permalink / raw)
To: Ioana Ciornei, bhelgaas
Cc: Roy Zang, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas,
Krzysztof Kozlowski, linux-pci, imx, linux-kernel
On Thu, Mar 27, 2025 at 05:19:49PM +0200, Ioana Ciornei wrote:
> The arg_count variable passed to the
> syscon_regmap_lookup_by_phandle_args() function represents the number of
> argument cells following the phandle. In this case, the number of
> arguments should be 1 instead of 2 since the dt property looks like
> below.
> fsl,pcie-scfg = <&scfg 0>;
>
> Without this fix, layerscape-pcie fails with the following message on
> LS1043A:
>
> [ 0.157041] OF: /soc/pcie@3500000: phandle scfg@1570000 needs 2, found 1
> [ 0.157050] layerscape-pcie 3500000.pcie: No syscfg phandle specified
> [ 0.157053] layerscape-pcie 3500000.pcie: probe with driver layerscape-pcie failed with error -22
>
> Fixes: 149fc35734e5 ("PCI: layerscape: Use syscon_regmap_lookup_by_phandle_args")
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
> ---
Bjorn:
This is hot fix for some layerscape platform, which block pcie
functions. 149fc35734e5 still in v6.14 next.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/pci/controller/dwc/pci-layerscape.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c
> index 239a05b36e8e..a44b5c256d6e 100644
> --- a/drivers/pci/controller/dwc/pci-layerscape.c
> +++ b/drivers/pci/controller/dwc/pci-layerscape.c
> @@ -356,7 +356,7 @@ static int ls_pcie_probe(struct platform_device *pdev)
> if (pcie->drvdata->scfg_support) {
> pcie->scfg =
> syscon_regmap_lookup_by_phandle_args(dev->of_node,
> - "fsl,pcie-scfg", 2,
> + "fsl,pcie-scfg", 1,
> index);
> if (IS_ERR(pcie->scfg)) {
> dev_err(dev, "No syscfg phandle specified\n");
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] PCI: layerscape: fix index passed to syscon_regmap_lookup_by_phandle_args
2025-03-27 15:19 [PATCH] PCI: layerscape: fix index passed to syscon_regmap_lookup_by_phandle_args Ioana Ciornei
2025-03-27 15:30 ` Krzysztof Kozlowski
2025-03-27 15:35 ` Frank Li
@ 2025-03-27 17:55 ` Bjorn Helgaas
2025-03-27 18:15 ` Bjorn Helgaas
2 siblings, 1 reply; 6+ messages in thread
From: Bjorn Helgaas @ 2025-03-27 17:55 UTC (permalink / raw)
To: Ioana Ciornei
Cc: Roy Zang, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas,
Krzysztof Kozlowski, Frank Li, linux-pci, imx, linux-kernel
On Thu, Mar 27, 2025 at 05:19:49PM +0200, Ioana Ciornei wrote:
> The arg_count variable passed to the
> syscon_regmap_lookup_by_phandle_args() function represents the number of
> argument cells following the phandle. In this case, the number of
> arguments should be 1 instead of 2 since the dt property looks like
> below.
> fsl,pcie-scfg = <&scfg 0>;
>
> Without this fix, layerscape-pcie fails with the following message on
> LS1043A:
>
> [ 0.157041] OF: /soc/pcie@3500000: phandle scfg@1570000 needs 2, found 1
> [ 0.157050] layerscape-pcie 3500000.pcie: No syscfg phandle specified
> [ 0.157053] layerscape-pcie 3500000.pcie: probe with driver layerscape-pcie failed with error -22
>
> Fixes: 149fc35734e5 ("PCI: layerscape: Use syscon_regmap_lookup_by_phandle_args")
> Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Thanks, applied to pci/controller/layerscape for v6.15. Hopefully the
last change for this cycle :)
Thanks for the message sample. I dropped the timestamps because
they're not really relevant here.
> ---
> drivers/pci/controller/dwc/pci-layerscape.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c
> index 239a05b36e8e..a44b5c256d6e 100644
> --- a/drivers/pci/controller/dwc/pci-layerscape.c
> +++ b/drivers/pci/controller/dwc/pci-layerscape.c
> @@ -356,7 +356,7 @@ static int ls_pcie_probe(struct platform_device *pdev)
> if (pcie->drvdata->scfg_support) {
> pcie->scfg =
> syscon_regmap_lookup_by_phandle_args(dev->of_node,
> - "fsl,pcie-scfg", 2,
> + "fsl,pcie-scfg", 1,
> index);
> if (IS_ERR(pcie->scfg)) {
> dev_err(dev, "No syscfg phandle specified\n");
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] PCI: layerscape: fix index passed to syscon_regmap_lookup_by_phandle_args
2025-03-27 17:55 ` Bjorn Helgaas
@ 2025-03-27 18:15 ` Bjorn Helgaas
0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2025-03-27 18:15 UTC (permalink / raw)
To: Ioana Ciornei
Cc: Roy Zang, Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Bjorn Helgaas,
Krzysztof Kozlowski, Frank Li, linux-pci, imx, linux-kernel
On Thu, Mar 27, 2025 at 12:55:57PM -0500, Bjorn Helgaas wrote:
> On Thu, Mar 27, 2025 at 05:19:49PM +0200, Ioana Ciornei wrote:
> > The arg_count variable passed to the
> > syscon_regmap_lookup_by_phandle_args() function represents the number of
> > argument cells following the phandle. In this case, the number of
> > arguments should be 1 instead of 2 since the dt property looks like
> > below.
> > fsl,pcie-scfg = <&scfg 0>;
> >
> > Without this fix, layerscape-pcie fails with the following message on
> > LS1043A:
> >
> > [ 0.157041] OF: /soc/pcie@3500000: phandle scfg@1570000 needs 2, found 1
> > [ 0.157050] layerscape-pcie 3500000.pcie: No syscfg phandle specified
> > [ 0.157053] layerscape-pcie 3500000.pcie: probe with driver layerscape-pcie failed with error -22
> >
> > Fixes: 149fc35734e5 ("PCI: layerscape: Use syscon_regmap_lookup_by_phandle_args")
> > Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
>
> Thanks, applied to pci/controller/layerscape for v6.15. Hopefully the
> last change for this cycle :)
>
> Thanks for the message sample. I dropped the timestamps because
> they're not really relevant here.
I guess this should have a stable tag since 149fc35734e5 appeared in
v6.14. I added one.
> > ---
> > drivers/pci/controller/dwc/pci-layerscape.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c
> > index 239a05b36e8e..a44b5c256d6e 100644
> > --- a/drivers/pci/controller/dwc/pci-layerscape.c
> > +++ b/drivers/pci/controller/dwc/pci-layerscape.c
> > @@ -356,7 +356,7 @@ static int ls_pcie_probe(struct platform_device *pdev)
> > if (pcie->drvdata->scfg_support) {
> > pcie->scfg =
> > syscon_regmap_lookup_by_phandle_args(dev->of_node,
> > - "fsl,pcie-scfg", 2,
> > + "fsl,pcie-scfg", 1,
> > index);
> > if (IS_ERR(pcie->scfg)) {
> > dev_err(dev, "No syscfg phandle specified\n");
> > --
> > 2.34.1
> >
^ permalink raw reply [flat|nested] 6+ messages in thread