summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/sbus/sbusvar.h
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2005-05-19 14:47:31 +0000
committermarius <marius@FreeBSD.org>2005-05-19 14:47:31 +0000
commit3aa0c43ebd643f73a0e5c127330cb85cd4540265 (patch)
treee5e0cd80c60db7a7a4ad0201be42672b21b10acc /sys/sparc64/sbus/sbusvar.h
parent2c7980531b11c0f49441c47b1a5de78331694ed1 (diff)
downloadFreeBSD-src-3aa0c43ebd643f73a0e5c127330cb85cd4540265.zip
FreeBSD-src-3aa0c43ebd643f73a0e5c127330cb85cd4540265.tar.gz
- Add an IVAR for retrieving the interrupt group number of the parent Sbus
device and which also applies to the children. This is very usefull for drivers for the various subordinate busses so they don't need to fiddle with the OFW node of their parent themselves. As SBus busses hang of the nexus and we don't use the ofw_bus interface for nexus devices, yet, this would also require special knowledge about this in the drivers for the SBus children which these shouldn't need to have. This includes switching to use an unshifted IGN in the sc_ign member of the sbus(4) softc internally. - For SBus child devices where there are variants that are actually split split into two SBus devices (as opposed to the first half of the device being a SBus device and the second half hanging off of the first one) like 'auxio' and 'SUNW,fdtwo' or 'dma' and 'esp' probe the SBus device which is a prerequisite to the driver attaching to the second one with a lower order. This saves us from dealing with different probe orders in the respective device drivers which generally is more hackish. - Remove a stale comment about the 'specials' array above the attaching of the child devices. This is a remnant of the NetBSD/sparc origin of this code. There the 'specials' array is also used to probe certain devices which are prerequisites to others first. Why NetBSD soley relies on the devices having the expected order in the OFW tree on sparc64 isn't clear to me, as far as I can tell OFW doesn't guaranteed such things.
Diffstat (limited to 'sys/sparc64/sbus/sbusvar.h')
-rw-r--r--sys/sparc64/sbus/sbusvar.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/sparc64/sbus/sbusvar.h b/sys/sparc64/sbus/sbusvar.h
index 049fc6e..e4f2895 100644
--- a/sys/sparc64/sbus/sbusvar.h
+++ b/sys/sparc64/sbus/sbusvar.h
@@ -80,6 +80,12 @@
#define _SPARC64_SBUS_SBUSVAR_H_
/*
+ * Macros for probe order
+ */
+#define SBUS_ORDER_FIRST 10
+#define SBUS_ORDER_NORMAL 20
+
+/*
* PROM-reported DMA burst sizes for the SBus
*/
#define SBUS_BURST_1 0x1
@@ -98,6 +104,7 @@
enum sbus_device_ivars {
SBUS_IVAR_BURSTSZ,
SBUS_IVAR_CLOCKFREQ,
+ SBUS_IVAR_IGN,
SBUS_IVAR_SLOT,
};
@@ -109,6 +116,7 @@ enum sbus_device_ivars {
SBUS_ACCESSOR(burstsz, BURSTSZ, int)
SBUS_ACCESSOR(clockfreq, CLOCKFREQ, int)
+SBUS_ACCESSOR(ign, IGN, int)
SBUS_ACCESSOR(slot, SLOT, int)
#undef SBUS_ACCESSOR
OpenPOWER on IntegriCloud