[PATCH 3/6] pci: layerscape: limit fixup to layerscape controllers
Sascha Hauer
s.hauer at pengutronix.de
Tue Dec 19 04:56:27 PST 2023
ls_pcie_fixup() assumes the fixed up device is attached to the layerscape
PCI controller. This may not be true when there's another controller
active in the system, so limit the execution of the fixup to the right
controller only.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/pci/pci-layerscape.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/pci-layerscape.c b/drivers/pci/pci-layerscape.c
index 0fb742af9a..12a0ec71a7 100644
--- a/drivers/pci/pci-layerscape.c
+++ b/drivers/pci/pci-layerscape.c
@@ -551,6 +551,9 @@ static void ls_pcie_fixup(struct pci_dev *pcidev)
uint32_t devid;
int base_bus_num = 0;
+ if (!of_match_device(ls_pcie_of_match, host->parent))
+ return;
+
stream_id = ls_pcie_next_streamid(lspcie);
index = ls_pcie_next_lut_index(lspcie);
--
2.39.2
More information about the barebox
mailing list