X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/12d6ee90b4eb06e80598d1a3056a77ae78709a80..39b5d600dedf02a61b8b1213f9fdaaee4b8292e0:/sys/sys/bus.h diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 5ad8942ac3..a4a36316da 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/bus.h,v 1.30.2.5 2004/03/17 17:54:25 njl Exp $ - * $DragonFly: src/sys/sys/bus.h,v 1.14 2005/05/24 20:58:44 dillon Exp $ + * $DragonFly: src/sys/sys/bus.h,v 1.17 2005/10/28 03:25:57 dillon Exp $ */ #ifndef _SYS_BUS_H_ @@ -47,29 +47,14 @@ typedef struct devclass *devclass_t; typedef void driver_intr_t(void*); /* - * We define this in terms of bits because some devices may belong - * to multiple classes (and therefore need to be included in - * multiple interrupt masks, which is what this really serves to - * indicate. Buses which do interrupt remapping will want to - * change their type to reflect what sort of devices are underneath. + * Interrupt features mask. Note that DragonFly no longer implements + * INTR_TYPE_* flags. */ -enum intr_type { - INTR_TYPE_TTY = 1, - INTR_TYPE_BIO = 2, - INTR_TYPE_NET = 4, - INTR_TYPE_CAM = 8, - INTR_TYPE_MISC = 16, - INTR_TYPE_CLK = 32, - INTR_TYPE_AV = 64, - INTR_FAST = 128, - INTR_EXCL = 256, - INTR_MPSAFE = 512, - INTR_ENTROPY = 1024 -}; - -#define INTR_TYPE_MASK (INTR_TYPE_TTY|INTR_TYPE_BIO|INTR_TYPE_NET|\ - INTR_TYPE_CAM|INTR_TYPE_MISC|INTR_TYPE_CLK|\ - INTR_TYPE_AV) +#define INTR_FAST 0x0080 +#define INTR_EXCL 0x0100 +#define INTR_MPSAFE 0x0200 +#define INTR_ENTROPY 0x0400 +#define INTR_NOPOLL 0x0800 /* interrupt cannot be polled (e.g. ata) */ enum intr_trigger { INTR_TRIGGER_CONFORM = 0, @@ -175,7 +160,6 @@ int resource_list_print_type(struct resource_list *rl, * The root bus, to which all top-level busses are attached. */ extern device_t root_bus; -extern devclass_t root_devclass; void root_bus_configure(void); /* @@ -205,7 +189,10 @@ void bus_generic_enable_intr(device_t dev, device_t child, void *cookie); int bus_print_child_header(device_t dev, device_t child); int bus_print_child_footer(device_t dev, device_t child); int bus_generic_print_child(device_t dev, device_t child); +int bus_generic_identify(driver_t *driver, device_t parent); +int bus_generic_identify_sameunit(driver_t *driver, device_t parent); int bus_generic_probe(device_t dev); +int bus_generic_probe_hack(device_t dev); int bus_generic_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); int bus_generic_release_resource(device_t bus, device_t child,