Skip to content

Commit a2a69ad

Browse files
Rafał Miłeckijmberg-intel
authored andcommitted
bcma: don't register devices disabled in OF
Some bus devices can be marked as disabled for specific SoCs or models. Those should not be registered to avoid probing them. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://patch.msgid.link/20251003125126.27950-1-zajec5@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 6078447 commit a2a69ad

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/bcma/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ static int bcma_register_devices(struct bcma_bus *bus)
294294
int err;
295295

296296
list_for_each_entry(core, &bus->cores, list) {
297+
struct device_node *np;
298+
297299
/* We support that core ourselves */
298300
switch (core->id.id) {
299301
case BCMA_CORE_4706_CHIPCOMMON:
@@ -311,6 +313,10 @@ static int bcma_register_devices(struct bcma_bus *bus)
311313
if (bcma_is_core_needed_early(core->id.id))
312314
continue;
313315

316+
np = core->dev.of_node;
317+
if (np && !of_device_is_available(np))
318+
continue;
319+
314320
/* Only first GMAC core on BCM4706 is connected and working */
315321
if (core->id.id == BCMA_CORE_4706_MAC_GBIT &&
316322
core->core_unit > 0)

0 commit comments

Comments
 (0)