diff --git a/sys/dev/spibus/spigen.c b/sys/dev/spibus/spigen.c index fd3dd3bec620..46920b3234a7 100644 --- a/sys/dev/spibus/spigen.c +++ b/sys/dev/spibus/spigen.c @@ -79,16 +79,19 @@ spigen_probe(device_t dev) { int rv; -#ifdef FDT - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (!ofw_bus_is_compatible(dev, "freebsd,spigen")) - return (ENXIO); - rv = BUS_PROBE_DEFAULT; -#else + /* + * By default we only bid to attach if specifically added by our parent + * (usually via hint.spigen.#.at=busname). On FDT systems we bid as the + * default driver based on being configured in the FDT data. + */ rv = BUS_PROBE_NOWILDCARD; + +#ifdef FDT + if (ofw_bus_status_okay(dev) && + ofw_bus_is_compatible(dev, "freebsd,spigen")) + rv = BUS_PROBE_DEFAULT; #endif + device_set_desc(dev, "SPI Generic IO"); return (rv);