From 77292e79c63875385b68eb7cd2eb27bc208cab8c Mon Sep 17 00:00:00 2001 From: aymeric Date: Mon, 21 Feb 2000 18:27:49 +0000 Subject: [PATCH] fix a couple of things to handle interrupts more cleanly on the A1200 --- sys/arch/amiga/dev/gayle_pcmcia.c | 13 +++++++------ sys/arch/amiga/dev/wdc_amiga.c | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/arch/amiga/dev/gayle_pcmcia.c b/sys/arch/amiga/dev/gayle_pcmcia.c index aec09217165a..f6b9a26764ea 100644 --- a/sys/arch/amiga/dev/gayle_pcmcia.c +++ b/sys/arch/amiga/dev/gayle_pcmcia.c @@ -1,4 +1,4 @@ -/* $NetBSD: gayle_pcmcia.c,v 1.1 2000/01/23 20:57:27 aymeric Exp $ */ +/* $NetBSD: gayle_pcmcia.c,v 1.2 2000/02/21 18:27:50 aymeric Exp $ */ /* PCMCIA front-end driver for A1200's and A600's. */ @@ -234,7 +234,8 @@ pccard_intr6(arg) struct pccard_softc *self = arg; if (gayle.intreq & GAYLE_INT_DETECT) { - gayle.intreq = GAYLE_INT_IDE | GAYLE_INT_IREQ; + gayle.intreq = GAYLE_INT_IDE | GAYLE_INT_STSCHG | + GAYLE_INT_SPKR | GAYLE_INT_WP | GAYLE_INT_IREQ; self->devs[0].flags |= SLOT_NEW_CARD_EVENT; return 1; } @@ -257,10 +258,10 @@ pccard_intr2(arg) gayle.pcc_config = 0; pccard_attach_slot(&self->devs[0]); } else { - int intreq = gayle.intreq; - if (intreq & GAYLE_INT_IREQ) { - gayle.intreq = (intreq ^ GAYLE_INT_IREQ) | - GAYLE_INT_IDE | GAYLE_INT_DETECT; + int intreq = gayle.intreq & + (GAYLE_INT_STSCHG | GAYLE_INT_WP | GAYLE_INT_IREQ); + if (intreq) { + gayle.intreq = (intreq ^ 0x2c) | 0xc0; if (slot->flags & SLOT_OCCUPIED && slot->intr_func != NULL) diff --git a/sys/arch/amiga/dev/wdc_amiga.c b/sys/arch/amiga/dev/wdc_amiga.c index 6708009b14db..6513392ef829 100644 --- a/sys/arch/amiga/dev/wdc_amiga.c +++ b/sys/arch/amiga/dev/wdc_amiga.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_amiga.c,v 1.4 2000/02/19 17:16:20 aymeric Exp $ */ +/* $NetBSD: wdc_amiga.c,v 1.5 2000/02/21 18:27:49 aymeric Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -143,7 +143,7 @@ wdc_amiga_attach(parent, self, aux) add_isr (&sc->sc_isr); if (is_a1200()) - gayle.intena |= GAYLE_INT_IREQ | GAYLE_INT_IDE; + gayle.intena |= GAYLE_INT_IDE; wdcattach(&sc->wdc_channel); }