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. Arm platforms which use FDT data to enumerate devices have been relying on devices being attached in the exact order they're listed in the dts source file. That's one of things currently preventing us from using vendor-supplied fdt data (because then we don't control the order of the devices in the data). Multi-pass attachment can go a long way towards solving that problem by ensuring things like clock and interrupt drivers are attached before the more mundane devices that need them. The long-term goal is to have all arm fdt-based platforms using multipass. This option is a bridge to that, letting us enable it selectively as platforms are converted and tested (the alternative being to just throw a big switch and try to fight fires as they're reported).
This commit is contained in:
parent
9e1bd3c87d
commit
9c1609965f
@ -125,7 +125,12 @@ static driver_t nexus_driver = {
|
||||
nexus_methods,
|
||||
1 /* no softc */
|
||||
};
|
||||
#ifdef ARM_DEVICE_MULTIPASS
|
||||
EARLY_DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0,
|
||||
BUS_PASS_BUS + BUS_PASS_ORDER_EARLY);
|
||||
#else
|
||||
DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0);
|
||||
#endif
|
||||
|
||||
static int
|
||||
nexus_probe(device_t dev)
|
||||
|
@ -1,6 +1,7 @@
|
||||
#$FreeBSD$
|
||||
ARM9_CACHE_WRITE_THROUGH opt_global.h
|
||||
ARM_CACHE_LOCK_ENABLE opt_global.h
|
||||
ARM_DEVICE_MULTIPASS opt_global.h
|
||||
ARM_KERN_DIRECTMAP opt_vm.h
|
||||
ARM_L2_PIPT opt_global.h
|
||||
ARM_MANY_BOARD opt_global.h
|
||||
|
Loading…
Reference in New Issue
Block a user