summaryrefslogtreecommitdiffstats
path: root/sys/dev/fdt
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-08-17 01:28:03 +0000
committerian <ian@FreeBSD.org>2014-08-17 01:28:03 +0000
commit2cc6abb7fbad979bb6fdddb3810bbb33c454c07d (patch)
treeb2b014c39942426f2e4c0c06d2a440e2ec86233c /sys/dev/fdt
parent46d28d66fb3e9d4bfd5383e9b2ffa437115af6e6 (diff)
downloadFreeBSD-src-2cc6abb7fbad979bb6fdddb3810bbb33c454c07d.zip
FreeBSD-src-2cc6abb7fbad979bb6fdddb3810bbb33c454c07d.tar.gz
MFC r269594, r269596, r269597, r269598, r269605, r269606:
Set ofwbus and simplebus to attach during BUS_PASS_BUS. Define names that drivers can use to adjust their position relative to other drivers within a BUS_PASS Adjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that a platform can attach some other bus first if necessary. Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU. Attach arm generic interrupt and timer drivers in the middle of BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively. Add an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass device attachment on arm platforms. If this is defined, nexus attaches early in BUS_PASS_BUS, and other busses and devices attach later, in the pass number they are set up for. Without it defined, nexus attaches in BUS_PASS_DEFAULT and thus so does everything else, which is status quo.
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r--sys/dev/fdt/simplebus.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c
index 1de4223..1c8e54c 100644
--- a/sys/dev/fdt/simplebus.c
+++ b/sys/dev/fdt/simplebus.c
@@ -121,8 +121,10 @@ static driver_t simplebus_driver = {
sizeof(struct simplebus_softc)
};
static devclass_t simplebus_devclass;
-DRIVER_MODULE(simplebus, ofwbus, simplebus_driver, simplebus_devclass, 0, 0);
-DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass, 0, 0);
+EARLY_DRIVER_MODULE(simplebus, ofwbus, simplebus_driver, simplebus_devclass,
+ 0, 0, BUS_PASS_BUS);
+EARLY_DRIVER_MODULE(simplebus, simplebus, simplebus_driver, simplebus_devclass,
+ 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
static int
simplebus_probe(device_t dev)
OpenPOWER on IntegriCloud