Skip to contentSkip to conversation

bcma: don't register devices disabled in OF

PATCH In review Rafał Miłecki 2 participants 2 messages Oct 3, 2025 Broadcom specific amba driver (bcma)

lore
Share & tools
lore

Rafał Miłecki

author maintainer
#0 lore raw

PATCH 1/1 bcma: don't register devices disabled in OF

From: Rafał Miłecki <[email protected]>

Some bus devices can be marked as disabled for specific SoCs or models. Those should not be registered to avoid probing them.

---
 drivers/bcma/main.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/bcma/main.c +6 -0
index 6ecfc821cf83..72f045e6ed51 100644
@@ -294,6 +294,8 @@ static int bcma_register_devices(struct bcma_bus *bus)
 	int err;
 
 	list_for_each_entry(core, &bus->cores, list) {
+		struct device_node *np;
+
 		/* We support that core ourselves */
 		switch (core->id.id) {
 		case BCMA_CORE_4706_CHIPCOMMON:
@@ -311,6 +313,10 @@ static int bcma_register_devices(struct bcma_bus *bus)
 		if (bcma_is_core_needed_early(core->id.id))
 			continue;
 
+		np = core->dev.of_node;
+		if (np && !of_device_is_available(np))
+			continue;
+
 		/* Only first GMAC core on BCM4706 is connected and working */
 		if (core->id.id == BCMA_CORE_4706_MAC_GBIT &&
 		    core->core_unit > 0)
Signature · 1 line
2.51.0