Skip to content

Commit 4c8c0ff

Browse files
IoanaCiorneibjorn-helgaas
authored andcommitted
PCI: layerscape: Fix arg_count to syscon_regmap_lookup_by_phandle_args()
The arg_count parameter to syscon_regmap_lookup_by_phandle_args() 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 this: fsl,pcie-scfg = <&scfg 0>; Without this fix, layerscape-pcie fails with the following message on LS1043A: OF: /soc/pcie@3500000: phandle scfg@1570000 needs 2, found 1 layerscape-pcie 3500000.pcie: No syscfg phandle specified layerscape-pcie 3500000.pcie: probe with driver layerscape-pcie failed with error -22 Link: https://lore.kernel.org/r/[email protected] Fixes: 149fc35 ("PCI: layerscape: Use syscon_regmap_lookup_by_phandle_args") Signed-off-by: Ioana Ciornei <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Frank Li <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Acked-by: Roy Zang <[email protected]> Cc: [email protected]
1 parent 2014c95 commit 4c8c0ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/controller/dwc/pci-layerscape.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static int ls_pcie_probe(struct platform_device *pdev)
356356
if (pcie->drvdata->scfg_support) {
357357
pcie->scfg =
358358
syscon_regmap_lookup_by_phandle_args(dev->of_node,
359-
"fsl,pcie-scfg", 2,
359+
"fsl,pcie-scfg", 1,
360360
index);
361361
if (IS_ERR(pcie->scfg)) {
362362
dev_err(dev, "No syscfg phandle specified\n");

0 commit comments

Comments
 (0)