diff options
author | mdodd <mdodd@FreeBSD.org> | 1999-08-01 22:57:09 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 1999-08-01 22:57:09 +0000 |
commit | c790088cf6511de19be83cd5a1ca24ad896d2be1 (patch) | |
tree | 62ea067550649b36861238bc9f0b86abd784376b /sys/dev/buslogic | |
parent | 6a572156072aa10677fe402b5b7995b0754131d6 (diff) | |
download | FreeBSD-src-c790088cf6511de19be83cd5a1ca24ad896d2be1.zip FreeBSD-src-c790088cf6511de19be83cd5a1ca24ad896d2be1.tar.gz |
Move the specification of EDGE/LEVEL triggered interrupts to
eisa_add_intr() which now takes an additional arguement (one of
EISA_TRIGGER_LEVEL or EISA_TRIGGER_EDGE).
The flag RR_SHAREABLE has no effect when passed to
bus_alloc_resource(dev, SYS_RES_IRQ, ...) in an EISA device context as
the eisa_alloc_resource() call (bus_alloc_resource method) now deals
with this flag directly, depending on the device ivars.
This change does nothing more than move all the 'shared = inb(foo + iobsse)'
nonesense to the device probe methods rather than the device attach.
Also, print out 'edge' or 'level' in the IRQ announcement message.
Reviewed by: dfr
Diffstat (limited to 'sys/dev/buslogic')
-rw-r--r-- | sys/dev/buslogic/bt_eisa.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/buslogic/bt_eisa.c b/sys/dev/buslogic/bt_eisa.c index fc369c8..eaaee0d 100644 --- a/sys/dev/buslogic/bt_eisa.c +++ b/sys/dev/buslogic/bt_eisa.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bt_eisa.c,v 1.6 1999/04/24 06:46:10 peter Exp $ + * $Id: bt_eisa.c,v 1.7 1999/05/08 21:59:18 dfr Exp $ */ #include "eisa.h" @@ -188,6 +188,7 @@ bt_eisa_probe(device_t dev) u_long iosize; u_int ioconf; int result; + int shared; desc = bt_match(eisa_get_id(dev)); if (!desc) @@ -229,6 +230,8 @@ bt_eisa_probe(device_t dev) eisa_get_slot(dev)); return (ENXIO); } + shared = (inb(iobase + AMI_EISA_IOCONF1) & AMI_IRQ_LEVEL) ? + EISA_TRIGGER_LEVEL : EISA_TRIGGER_EDGE; } else { iobase += BT_EISA_SLOT_OFFSET; iosize = BT_EISA_IOSIZE; @@ -262,6 +265,8 @@ bt_eisa_probe(device_t dev) eisa_get_slot(dev)); return (ENXIO); } + shared = (inb(iobase + EISA_IRQ_TYPE) & LEVEL) ? + EISA_TRIGGER_LEVEL : EISA_TRIGGER_EDGE; } bt_mark_probed_iop(port); @@ -277,7 +282,7 @@ bt_eisa_probe(device_t dev) "card at slot 0x%x\n", eisa_get_slot(dev)); result = ENXIO; } else { - eisa_add_intr(dev, info.irq); + eisa_add_intr(dev, info.irq, shared); result = 0; } bt_eisa_release_resources(dev); |