Convert to generalized VIA interrupt registration

This commit is contained in:
scottr 1997-02-28 07:46:59 +00:00
parent 8f37a2983b
commit 359101fb43
4 changed files with 18 additions and 16 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: esp.c,v 1.7 1997/02/27 14:06:25 briggs Exp $ */
/* $NetBSD: esp.c,v 1.8 1997/02/28 07:46:59 scottr Exp $ */
/*
* Copyright (c) 1996 Charles M. Hannum. All rights reserved.
@ -185,8 +185,8 @@ espattach(parent, self, aux)
unsigned long reg_offset;
esc->sc_reg = (volatile u_char *) SCSIBase;
mac68k_register_scsi_irq(
(void (*)(void *)) ncr53c9x_intr, esc);
via2_register_irq(VIA2_SCSIIRQ,
(void (*)(void *))ncr53c9x_intr, esc);
esc->irq_mask = V2IF_SCSIIRQ;
reg_offset = SCSIBase - IOBase;
if (reg_offset == 0x10000) {
@ -196,8 +196,8 @@ espattach(parent, self, aux)
}
} else {
esc->sc_reg = (volatile u_char *) SCSIBase + 0x402;
mac68k_register_scsi_b_irq(
(void (*)(void *)) ncr53c9x_intr, sc);
via2_register_irq(VIA2_SCSIDRQ,
(void (*)(void *))ncr53c9x_intr, esc);
esc->irq_mask = V2IF_SCSIDRQ; /* V2IF_T1? */
sc->sc_freq = 25000000;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sbc.c,v 1.20 1997/02/26 22:29:08 gwr Exp $ */
/* $NetBSD: sbc.c,v 1.21 1997/02/28 07:47:01 scottr Exp $ */
/*
* Copyright (C) 1996 Scott Reynolds. All rights reserved.
@ -341,8 +341,8 @@ sbc_attach(parent, self, args)
ncr_sc->sc_dma_start = sbc_dma_start;
ncr_sc->sc_dma_eop = sbc_dma_eop;
ncr_sc->sc_dma_stop = sbc_dma_stop;
mac68k_register_scsi_drq(sbc_drq_intr, ncr_sc);
mac68k_register_scsi_irq(sbc_irq_intr, ncr_sc);
via2_register_irq(VIA2_SCSIDRQ, sbc_drq_intr, ncr_sc);
via2_register_irq(VIA2_SCSIIRQ, sbc_irq_intr, ncr_sc);
} else
ncr_sc->sc_flags |= NCR5380_FORCE_POLLING;

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.32 1997/01/15 01:28:53 perry Exp $ */
/* $NetBSD: clock.c,v 1.33 1997/02/28 07:49:19 scottr Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -95,6 +95,8 @@
#include "clockreg.h"
#include <machine/viareg.h>
void rtclock_intr __P((void));
#define DIFF19041970 2082844800
#define DIFF19701990 630720000
#define DIFF19702010 1261440000
@ -481,7 +483,7 @@ mac68k_calibrate_delay()
/* Disable VIA1 timer 1 interrupts and set up service routine */
via_reg(VIA1, vIER) = V1IF_T1;
mac68k_register_via1_t1_irq(delay_timer1_irq);
via1_register_irq(VIA1_T1, delay_timer1_irq, NULL);
/* Set the timer for one-shot mode, then clear and enable interrupts */
via_reg(VIA1, vACR) &= ~ACR_T1LATCH;
@ -497,7 +499,7 @@ mac68k_calibrate_delay()
/* Disable timer interrupts and reset service routine */
via_reg(VIA1, vIER) = V1IF_T1;
mac68k_register_via1_t1_irq(NULL);
via1_register_irq(VIA1_T1, (void (*)(void *))rtclock_intr, NULL);
/*
* If this weren't integer math, the following would look

View File

@ -1,4 +1,4 @@
/* $NetBSD: esp.c,v 1.7 1997/02/27 14:06:25 briggs Exp $ */
/* $NetBSD: esp.c,v 1.8 1997/02/28 07:46:59 scottr Exp $ */
/*
* Copyright (c) 1996 Charles M. Hannum. All rights reserved.
@ -185,8 +185,8 @@ espattach(parent, self, aux)
unsigned long reg_offset;
esc->sc_reg = (volatile u_char *) SCSIBase;
mac68k_register_scsi_irq(
(void (*)(void *)) ncr53c9x_intr, esc);
via2_register_irq(VIA2_SCSIIRQ,
(void (*)(void *))ncr53c9x_intr, esc);
esc->irq_mask = V2IF_SCSIIRQ;
reg_offset = SCSIBase - IOBase;
if (reg_offset == 0x10000) {
@ -196,8 +196,8 @@ espattach(parent, self, aux)
}
} else {
esc->sc_reg = (volatile u_char *) SCSIBase + 0x402;
mac68k_register_scsi_b_irq(
(void (*)(void *)) ncr53c9x_intr, sc);
via2_register_irq(VIA2_SCSIDRQ,
(void (*)(void *))ncr53c9x_intr, esc);
esc->irq_mask = V2IF_SCSIDRQ; /* V2IF_T1? */
sc->sc_freq = 25000000;
}