From: Semih Baskan <strst.gs@gmail.com>
To: Bjorn Helgaas <helgaas@kernel.org>,
Manivannan Sadhasivam <mani@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>
Cc: "Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Rob Herring" <robh@kernel.org>, "Ray Jui" <rjui@broadcom.com>,
"Scott Branden" <sbranden@broadcom.com>,
"Rafał Miłecki" <rafal@milecki.pl>,
"Rafał Miłecki" <zajec5@gmail.com>,
"Arnd Bergmann" <arnd@arndb.de>,
bcm-kernel-feedback-list@broadcom.com, linux-pci@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Semih Baskan" <strst.gs@gmail.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@oss.qualcomm.com>
Subject: [PATCH] PCI: iproc: Skip BCMA-attached controllers in the platform bus driver
Date: Mon, 19 Oct 2026 06:52:49 +0000 [thread overview]
Message-ID: <20261019065249.552-1-strst.gs@gmail.com> (raw)
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
next reply other threads:[~2026-10-19 6:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 6:52 Semih Baskan [this message]
2026-10-19 6:56 ` [PATCH] PCI: iproc: Skip BCMA-attached controllers in the platform bus driver sashiko-bot
2026-10-20 16:40 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261019065249.552-1-strst.gs@gmail.com \
--to=strst.gs@gmail.com \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bhelgaas@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=helgaas@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=rafal@milecki.pl \
--cc=rjui@broadcom.com \
--cc=robh@kernel.org \
--cc=sbranden@broadcom.com \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox