[PATCH v2 3/5] bcma: scan: accept wrapper-less cores on wrapper-less backplanes

From: Alessio Ferri

Date: Sun Oct 11 2026 - 18:49:06 EST


The scan drops every component that publishes no master or slave
wrapper in the EROM (NMW = NSW = 0), apart from a few known cores,
because without a wrapper bcma has no agent registers to gate and
crash. Since usually bcma is loaded early, it ends as a loop-crash.

Some backplanes, such as the integrated WLAN of the BCM6362, have
no wrappers on any core. ChipCommon and the 802.11 core are gated
through a SoC-level register block owned by the host driver, whose
aread32/awrite32 ops emulate the agent registers, and core 0x837
needs no gating.

Add a wrapperless flag to struct bcma_bus, set by the host driver
before bcma_init_bus(), and accept these cores without wrappers when
it is set. Other hosts keep rejecting them.

Assisted-by: LLM sparse
Signed-off-by: Alessio Ferri <alessio.ferri@xxxxxxxxxxx>
---
drivers/bcma/scan.c | 6 ++++++
include/linux/bcma/bcma.h | 2 ++
2 files changed, 8 insertions(+)

diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
index 983a62ddeebb..ef880b635971 100644
--- a/drivers/bcma/scan.c
+++ b/drivers/bcma/scan.c
@@ -318,6 +318,12 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr,
case BCMA_CORE_GCI:
/* Not used yet: case BCMA_CORE_OOB_ROUTER: */
break;
+ case BCMA_CORE_CHIPCOMMON:
+ case BCMA_CORE_80211:
+ case BCMA_CORE_SHIM:
+ if (bus->wrapperless)
+ break;
+ fallthrough;
default:
bcma_erom_skip_component(bus, eromptr);
return -ENXIO;
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index 7ab2b21e7238..5dcf877e2872 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -365,6 +365,8 @@ struct bcma_bus {

/* Backplane registers, EROM included, are big-endian */
bool big_endian;
+ /* Cores have no DMP wrappers, the host ops handle agent accesses */
+ bool wrapperless;
};

static inline u32 bcma_read8(struct bcma_device *core, u16 offset)

--
2.56.0