* [PATCH] PCI: iproc: Skip BCMA-attached controllers in the platform bus driver
@ 2026-10-19 6:52 Semih Baskan
0 siblings, 0 replies; only message in thread
From: Semih Baskan @ 2026-10-19 6:52 UTC (permalink / raw)
To: Bjorn Helgaas, Manivannan Sadhasivam, Florian Fainelli
Cc: Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
Ray Jui, Scott Branden, Rafał Miłecki,
Rafał Miłecki, Arnd Bergmann, bcm-kernel-feedback-list,
linux-pci, linux-arm-kernel, linux-kernel, Bjorn Helgaas,
Semih Baskan, Manivannan Sadhasivam
Since commit 767012397976 ("ARM: dts: BCM5301X: Describe PCIe
controllers fully"), the Northstar PCIe nodes under the "brcm,bus-axi"
node have compatible = "brcm,iproc-pcie". bcma_bus_register() creates
platform devices for the children of that node before it registers its
own cores, so pcie-iproc-platform probes these controllers before
pcie-iproc-bcma does, as IPROC_PCIE_PAXB.
IPROC_PCIE_PAXB sets has_apb_err_disable, so the first config read on
bus 1 reads APB_ERR_EN at offset 0xf40. The report in the Closes: link
shows that read taking an external abort. On a BCM47081 (PCIe core
revision 0x01) with a device behind the root port, the board does not
boot, and it boots when has_apb_err_disable is cleared.
Return -ENODEV for a controller whose parent is "brcm,bus-axi", before
the driver allocates or maps anything, so that the controller is left
to pcie-iproc-bcma. The devicetree stays as it is. The check does not
depend on CONFIG_PCIE_IPROC_BCMA, because a kernel with only
pcie-iproc-platform does not boot on the BCM47081 either. On a BCM47094
(core revision 0x07) pcie-iproc-platform enumerates the devices on its
own, so there a kernel without CONFIG_PCIE_IPROC_BCMA loses PCIe, as
before v7.1. CONFIG_PCIE_IPROC_BCMA defaults to y on ARCH_BCM_5301X.
Tested on an ASUS RT-N18U (BCM47081) on a 6.18 kernel with the
controller/iproc-bcma changes backported. With both drivers enabled,
pcie-iproc-bcma binds controller 0, the BCM4360 behind it enumerates
and the platform driver logs nothing. With only pcie-iproc-platform
enabled, the board boots without PCIe. Without this change, neither
configuration boots on this board.
Fixes: 767012397976 ("ARM: dts: BCM5301X: Describe PCIe controllers fully")
Reported-by: Florian Fainelli <florian.fainelli@broadcom.com>
Closes: https://lore.kernel.org/r/0dcfb2db-5536-465a-bee1-afe160535748@broadcom.com
Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Signed-off-by: Semih Baskan <strst.gs@gmail.com>
---
This is on controller/iproc-bcma in pci.git and needs 9850907ee1dd
("PCI: iproc: Use the EROM outbound window on BCMA"). Without that
commit, pcie-iproc-bcma fails with -EBUSY on v7.1 and later, so this
change alone would leave Northstar without PCIe. If this goes to
stable, 39d1c645bb99 and 9850907ee1dd have to go with it.
Mani's sketch [1] returned -EINVAL; this returns -ENODEV, which the
driver core does not log as a probe failure.
[1] https://lore.kernel.org/r/179197555828.38040.6359970121400952902.b4-reply@b4
drivers/pci/controller/pcie-iproc-platform.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/controller/pcie-iproc-platform.c b/drivers/pci/controller/pcie-iproc-platform.c
index 4c9a0c4bb923..63560c733a8f 100644
--- a/drivers/pci/controller/pcie-iproc-platform.c
+++ b/drivers/pci/controller/pcie-iproc-platform.c
@@ -45,6 +45,9 @@ static int iproc_pltfm_pcie_probe(struct platform_device *pdev)
struct pci_host_bridge *bridge;
int ret;
+ if (of_device_is_compatible(np->parent, "brcm,bus-axi"))
+ return -ENODEV;
+
bridge = devm_pci_alloc_host_bridge(dev, sizeof(*pcie));
if (!bridge)
return -ENOMEM;
base-commit: 9850907ee1dd4376c09c4129e0adbe3b39d191b7
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-19 6:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-19 6:52 [PATCH] PCI: iproc: Skip BCMA-attached controllers in the platform bus driver Semih Baskan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®