From b1fab0ffc0dfe2fcbac1eb90620706cd2e81a34e Mon Sep 17 00:00:00 2001 From: Peter Grehan <grehan@FreeBSD.org> Date: Fri, 18 Mar 2005 03:29:39 +0000 Subject: [PATCH] Split configure into 3 steps ala sparc64 Obtained from: iedowse, sparc64 --- sys/powerpc/powerpc/autoconf.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/powerpc/autoconf.c b/sys/powerpc/powerpc/autoconf.c index 06787f7ad904..2f3b52781a94 100644 --- a/sys/powerpc/powerpc/autoconf.c +++ b/sys/powerpc/powerpc/autoconf.c @@ -35,18 +35,35 @@ __FBSDID("$FreeBSD$"); static device_t nexusdev; +static void configure_first(void *); static void configure(void *); -SYSINIT(configure, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL) +static void configure_final(void *); + +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 *dummy) { nexusdev = device_add_child(root_bus, "nexus", 0); - root_bus_configure(); + root_bus_configure(); +} + +static void +configure_final(void *dummy) +{ /* * Enable device interrupts */ @@ -54,3 +71,5 @@ configure(void *dummy) cold = 0; } + +