svn commit: r269606 - in head/sys: arm/arm conf

Ian Lepore ian at FreeBSD.org
Tue Aug 5 19:06:46 UTC 2014


Author: ian
Date: Tue Aug  5 19:06:45 2014
New Revision: 269606
URL: http://svnweb.freebsd.org/changeset/base/269606

Log:
  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).

Modified:
  head/sys/arm/arm/nexus.c
  head/sys/conf/options.arm

Modified: head/sys/arm/arm/nexus.c
==============================================================================
--- head/sys/arm/arm/nexus.c	Tue Aug  5 18:51:51 2014	(r269605)
+++ head/sys/arm/arm/nexus.c	Tue Aug  5 19:06:45 2014	(r269606)
@@ -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)

Modified: head/sys/conf/options.arm
==============================================================================
--- head/sys/conf/options.arm	Tue Aug  5 18:51:51 2014	(r269605)
+++ head/sys/conf/options.arm	Tue Aug  5 19:06:45 2014	(r269606)
@@ -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


More information about the svn-src-all mailing list