Return BUS_PROBE_DEFAULT, not zero, because this is not the one driver

implementation that must be used, it's just the base system default driver.

Also add a comment noting that we're being more liberal about the bus
frequency property than the dts binding documents require.
This commit is contained in:
Ian Lepore 2018-04-07 18:58:58 +00:00
parent c1ec6ac510
commit ade70a1ad1

View File

@ -71,7 +71,7 @@ ofw_spibus_probe(device_t dev)
return (ENXIO);
device_set_desc(dev, "OFW SPI bus");
return (0);
return (BUS_PROBE_DEFAULT);
}
static int
@ -126,6 +126,10 @@ ofw_spibus_attach(device_t dev)
/*
* Get the maximum clock frequency for device, zero means
* use the default bus speed.
*
* XXX Note that the current (2018-04-07) dts bindings say that
* spi-max-frequency is a required property (but says nothing of
* how to interpret a value of zero).
*/
if (OF_getencprop(child, "spi-max-frequency", &clock,
sizeof(clock)) == -1)