summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
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
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')
-rw-r--r--sys/sparc64/central/central.c3
-rw-r--r--sys/sparc64/ebus/ebus.c3
-rw-r--r--sys/sparc64/fhc/fhc.c6
-rw-r--r--sys/sparc64/pci/apb.c2
-rw-r--r--sys/sparc64/pci/ofw_pcib.c3
-rw-r--r--sys/sparc64/pci/ofw_pcibus.c3
-rw-r--r--sys/sparc64/sbus/dma_sbus.c8
-rw-r--r--sys/sparc64/sbus/sbus.c3
-rw-r--r--sys/sparc64/sparc64/nexus.c3
-rw-r--r--sys/sparc64/sparc64/upa.c2
10 files changed, 25 insertions, 11 deletions
diff --git a/sys/sparc64/central/central.c b/sys/sparc64/central/central.c
index 012130f..777660f 100644
--- a/sys/sparc64/central/central.c
+++ b/sys/sparc64/central/central.c
@@ -105,7 +105,8 @@ static driver_t central_driver = {
static devclass_t central_devclass;
-DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0);
+EARLY_DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0,
+ BUS_PASS_BUS);
MODULE_DEPEND(fhc, nexus, 1, 1, 1);
MODULE_VERSION(central, 1);
diff --git a/sys/sparc64/ebus/ebus.c b/sys/sparc64/ebus/ebus.c
index 3bafaae..a3e6d58 100644
--- a/sys/sparc64/ebus/ebus.c
+++ b/sys/sparc64/ebus/ebus.c
@@ -138,7 +138,8 @@ static driver_t ebus_driver = {
static devclass_t ebus_devclass;
-DRIVER_MODULE(ebus, pci, ebus_driver, ebus_devclass, 0, 0);
+EARLY_DRIVER_MODULE(ebus, pci, ebus_driver, ebus_devclass, 0, 0,
+ BUS_PASS_BUS);
MODULE_DEPEND(ebus, pci, 1, 1, 1);
MODULE_VERSION(ebus, 1);
diff --git a/sys/sparc64/fhc/fhc.c b/sys/sparc64/fhc/fhc.c
index 6ef7b1b..6aefffa 100644
--- a/sys/sparc64/fhc/fhc.c
+++ b/sys/sparc64/fhc/fhc.c
@@ -119,9 +119,11 @@ static driver_t fhc_driver = {
static devclass_t fhc_devclass;
-DRIVER_MODULE(fhc, central, fhc_driver, fhc_devclass, 0, 0);
+EARLY_DRIVER_MODULE(fhc, central, fhc_driver, fhc_devclass, 0, 0,
+ BUS_PASS_BUS);
MODULE_DEPEND(fhc, central, 1, 1, 1);
-DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0);
+EARLY_DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0,
+ BUS_PASS_BUS);
MODULE_DEPEND(fhc, nexus, 1, 1, 1);
MODULE_VERSION(fhc, 1);
diff --git a/sys/sparc64/pci/apb.c b/sys/sparc64/pci/apb.c
index 54087cc..2f4932e 100644
--- a/sys/sparc64/pci/apb.c
+++ b/sys/sparc64/pci/apb.c
@@ -111,7 +111,7 @@ static device_method_t apb_methods[] = {
static devclass_t pcib_devclass;
DEFINE_CLASS_0(pcib, apb_driver, apb_methods, sizeof(struct apb_softc));
-DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0);
+EARLY_DRIVER_MODULE(apb, pci, apb_driver, pcib_devclass, 0, 0, BUS_PASS_BUS);
MODULE_DEPEND(apb, pci, 1, 1, 1);
/* APB specific registers */
diff --git a/sys/sparc64/pci/ofw_pcib.c b/sys/sparc64/pci/ofw_pcib.c
index 72ddeb8..1988561 100644
--- a/sys/sparc64/pci/ofw_pcib.c
+++ b/sys/sparc64/pci/ofw_pcib.c
@@ -93,7 +93,8 @@ static devclass_t pcib_devclass;
DEFINE_CLASS_0(pcib, ofw_pcib_driver, ofw_pcib_methods,
sizeof(struct ofw_pcib_gen_softc));
-DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0);
+EARLY_DRIVER_MODULE(ofw_pcib, pci, ofw_pcib_driver, pcib_devclass, 0, 0,
+ BUS_PASS_BUS);
MODULE_DEPEND(ofw_pcib, pci, 1, 1, 1);
static int
diff --git a/sys/sparc64/pci/ofw_pcibus.c b/sys/sparc64/pci/ofw_pcibus.c
index bd2c7a6..571b6ac 100644
--- a/sys/sparc64/pci/ofw_pcibus.c
+++ b/sys/sparc64/pci/ofw_pcibus.c
@@ -101,7 +101,8 @@ static devclass_t pci_devclass;
DEFINE_CLASS_1(pci, ofw_pcibus_driver, ofw_pcibus_methods, 1 /* no softc */,
pci_driver);
-DRIVER_MODULE(ofw_pcibus, pcib, ofw_pcibus_driver, pci_devclass, 0, 0);
+EARLY_DRIVER_MODULE(ofw_pcibus, pcib, ofw_pcibus_driver, pci_devclass, 0, 0,
+ BUS_PASS_BUS);
MODULE_VERSION(ofw_pcibus, 1);
MODULE_DEPEND(ofw_pcibus, pci, 1, 1, 1);
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);
diff --git a/sys/sparc64/sparc64/nexus.c b/sys/sparc64/sparc64/nexus.c
index 798eec9..04c2ddb 100644
--- a/sys/sparc64/sparc64/nexus.c
+++ b/sys/sparc64/sparc64/nexus.c
@@ -144,7 +144,8 @@ static device_method_t nexus_methods[] = {
static devclass_t nexus_devclass;
DEFINE_CLASS_0(nexus, nexus_driver, nexus_methods, sizeof(struct nexus_softc));
-DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0);
+EARLY_DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0,
+ BUS_PASS_BUS);
MODULE_VERSION(nexus, 1);
static const char *const nexus_excl_name[] = {
diff --git a/sys/sparc64/sparc64/upa.c b/sys/sparc64/sparc64/upa.c
index 7e81c89..ecb11a2 100644
--- a/sys/sparc64/sparc64/upa.c
+++ b/sys/sparc64/sparc64/upa.c
@@ -151,7 +151,7 @@ static device_method_t upa_methods[] = {
static devclass_t upa_devclass;
DEFINE_CLASS_0(upa, upa_driver, upa_methods, sizeof(struct upa_softc));
-DRIVER_MODULE(upa, nexus, upa_driver, upa_devclass, 0, 0);
+EARLY_DRIVER_MODULE(upa, nexus, upa_driver, upa_devclass, 0, 0, BUS_PASS_BUS);
static const struct intr_controller upa_ic = {
upa_intr_enable,
OpenPOWER on IntegriCloud