summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/sbus
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2009-12-22 21:02:46 +0000
committermarius <marius@FreeBSD.org>2009-12-22 21:02:46 +0000
commit8051f5835e12d1cba001269e9d65acfa61995b7e (patch)
tree725ef54a565db62bee14db1a99d5113ab1bfc6d5 /sys/sparc64/sbus
parenta01fc2fc2d74b75bbe547356005cf64262d95a9d (diff)
downloadFreeBSD-src-8051f5835e12d1cba001269e9d65acfa61995b7e.zip
FreeBSD-src-8051f5835e12d1cba001269e9d65acfa61995b7e.tar.gz
Enroll these drivers in multipass probing. The motivation behind this
is that the JBus to EBus bridges share the interrupt controller of a sibling JBus to PCIe bridge (at least as far as the OFW device tree is concerned, in reality they are part of the same chip) so we have to probe and attach the latter first. That happens to be also the case due to the fact that the JBus to PCIe bridges appear first in the OFW device tree but it doesn't hurt to ensure the right order.
Diffstat (limited to 'sys/sparc64/sbus')
-rw-r--r--sys/sparc64/sbus/dma_sbus.c8
-rw-r--r--sys/sparc64/sbus/sbus.c3
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/sparc64/sbus/dma_sbus.c b/sys/sparc64/sbus/dma_sbus.c
index b4c2e5e..4bc1d43 100644
--- a/sys/sparc64/sbus/dma_sbus.c
+++ b/sys/sparc64/sbus/dma_sbus.c
@@ -149,7 +149,13 @@ static driver_t dma_driver = {
sizeof(struct dma_softc),
};
-DRIVER_MODULE(dma, sbus, dma_driver, dma_devclass, 0, 0);
+/*
+ * The probe order is handled by sbus(4) as we don't want the variants
+ * with children to be attached earlier than the stand-alone controllers
+ * in order to generally preserve the OFW device tree order.
+ */
+EARLY_DRIVER_MODULE(dma, sbus, dma_driver, dma_devclass, 0, 0,
+ BUS_PASS_DEFAULT);
MODULE_DEPEND(dma, sbus, 1, 1, 1);
MODULE_VERSION(dma, 1);
diff --git a/sys/sparc64/sbus/sbus.c b/sys/sparc64/sbus/sbus.c
index b42a993..0c4b509 100644
--- a/sys/sparc64/sbus/sbus.c
+++ b/sys/sparc64/sbus/sbus.c
@@ -247,7 +247,8 @@ static driver_t sbus_driver = {
static devclass_t sbus_devclass;
-DRIVER_MODULE(sbus, nexus, sbus_driver, sbus_devclass, 0, 0);
+EARLY_DRIVER_MODULE(sbus, nexus, sbus_driver, sbus_devclass, 0, 0,
+ BUS_PASS_BUS);
MODULE_DEPEND(sbus, nexus, 1, 1, 1);
MODULE_VERSION(sbus, 1);
OpenPOWER on IntegriCloud