RE: [PATCH] PCI: layerscape: fix index passed to syscon_regmap_lookup_by_phandle_args

From: Roy Zang
Date: Thu Mar 27 2025 - 11:32:32 EST




> -----Original Message-----
> From: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
> 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@xxxxxxxxxx>
Thank you Ioana for the quick patch fix.
Acked-by: Roy Zang <Roy.Zang@xxxxxxx>

Roy

Attachment: smime.p7s
Description: S/MIME cryptographic signature