From 54070562effc0eb597728bd04a2f8b1622b39c9d Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Thu, 17 Mar 2005 20:31:36 +0000 Subject: [PATCH] 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. --- sys/sparc64/sparc64/autoconf.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/sys/sparc64/sparc64/autoconf.c b/sys/sparc64/sparc64/autoconf.c index 24783ab20e23..c3885a4f49f9 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; }