From 5c69b7356675fe1e21b2e80c77aeed552247fb55 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Sat, 14 Jun 2003 19:13:42 +0000 Subject: [PATCH] Set intrtype[] properly. XXX ISA interrupts on Tyne does not work yet. --- sys/arch/arc/isa/isabus.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/arch/arc/isa/isabus.c b/sys/arch/arc/isa/isabus.c index 7dd9090a9c2e..dead4c0c30be 100644 --- a/sys/arch/arc/isa/isabus.c +++ b/sys/arch/arc/isa/isabus.c @@ -1,4 +1,4 @@ -/* $NetBSD: isabus.c,v 1.21 2003/06/14 19:11:41 tsutsui Exp $ */ +/* $NetBSD: isabus.c,v 1.22 2003/06/14 19:13:42 tsutsui Exp $ */ /* $OpenBSD: isabus.c,v 1.15 1998/03/16 09:38:46 pefo Exp $ */ /* NetBSD: isa.c,v 1.33 1995/06/28 04:30:51 cgd Exp */ @@ -318,6 +318,9 @@ isabr_intr_establish(ic, irq, type, level, ih_fun, ih_arg) panic("intr_establish: bogus irq or type"); switch (intrtype[irq]) { + case IST_NONE: + intrtype[irq] = type; + break; case IST_EDGE: case IST_LEVEL: if (type == intrtype[irq]) @@ -426,6 +429,20 @@ void isabr_initicu() { + int i; + + for (i = 0; i < ICU_LEN; i++) { + switch (i) { + case 2: + case 8: + intrtype[i] = IST_EDGE; + break; + default: + intrtype[i] = IST_NONE; + break; + } + } + isa_outb(IO_ICU1, 0x11); /* reset; program device, four bytes */ isa_outb(IO_ICU1+1, 0); /* starting at this vector index */ isa_outb(IO_ICU1+1, 1 << IRQ_SLAVE); /* slave on line 2 */