Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ofw/ofwbus.c
Show First 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | DEFINE_CLASS_1(ofwbus, ofwbus_driver, ofwbus_methods, | ||||
sizeof(struct simplebus_softc), simplebus_driver); | sizeof(struct simplebus_softc), simplebus_driver); | ||||
EARLY_DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, 0, 0, | EARLY_DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, 0, 0, | ||||
BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); | BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); | ||||
MODULE_VERSION(ofwbus, 1); | MODULE_VERSION(ofwbus, 1); | ||||
static int | static int | ||||
ofwbus_probe(device_t dev) | ofwbus_probe(device_t dev) | ||||
{ | { | ||||
if (OF_peer(0) == 0) | if (OF_peer(0) == 0) | ||||
return (ENXIO); | return (ENXIO); | ||||
/* Only one instance of ofwbus. */ | /* Only one instance of ofwbus. */ | ||||
if (device_get_unit(dev) != 0) | if (device_get_unit(dev) != 0) | ||||
panic("ofwbus added with non-zero unit number: %d\n", | panic("ofwbus added with non-zero unit number: %d\n", | ||||
device_get_unit(dev)); | device_get_unit(dev)); | ||||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |