summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2005-03-17 20:31:36 +0000
committeriedowse <iedowse@FreeBSD.org>2005-03-17 20:31:36 +0000
commit6789e655302fcfd3e4216b103ff2ad588ced3643 (patch)
tree5bb06a1a76e4c9d21cf9a545e63c036e22bc1af2
parentf41842a94161cef7cae0dfa1a48f348558731a40 (diff)
downloadFreeBSD-src-6789e655302fcfd3e4216b103ff2ad588ced3643.zip
FreeBSD-src-6789e655302fcfd3e4216b103ff2ad588ced3643.tar.gz
Split configure() into 3 separate steps like we do on other
architectures. This makes it possible to insert hooks before and after the device attachment step.
-rw-r--r--sys/sparc64/sparc64/autoconf.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/sys/sparc64/sparc64/autoconf.c b/sys/sparc64/sparc64/autoconf.c
index 24783ab..c3885a4 100644
--- a/sys/sparc64/sparc64/autoconf.c
+++ b/sys/sparc64/sparc64/autoconf.c
@@ -41,12 +41,26 @@ extern device_t isa_bus_device;
static device_t nexusdev;
-static void configure(void *);
+static void configure_first(void *);
+static void configure(void *);
+static void configure_final(void *);
-SYSINIT(configure, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL);
+SYSINIT(configure1, SI_SUB_CONFIGURE, SI_ORDER_FIRST, configure_first, NULL);
+/* SI_ORDER_SECOND is hookable */
+SYSINIT(configure2, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL);
+/* SI_ORDER_MIDDLE is hookable */
+SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL);
+
+/*
+ * Determine i/o configuration for a machine.
+ */
+static void
+configure_first(void *dummy)
+{
+}
static void
-configure(void *v)
+configure(void *dummy)
{
nexusdev = device_add_child(root_bus, "nexus", 0);
@@ -55,5 +69,11 @@ configure(void *v)
if (isa_bus_device != NULL)
isa_probe_children(isa_bus_device);
#endif
+}
+
+static void
+configure_final(void *dummy)
+{
+
cold = 0;
}
OpenPOWER on IntegriCloud