Switch over to using podulebus_irq_establish().
This commit is contained in:
parent
f93ec22c6d
commit
614827277d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: amps.c,v 1.5 2001/03/17 20:34:44 bjh21 Exp $ */
|
||||
/* $NetBSD: amps.c,v 1.6 2001/03/18 16:58:55 bjh21 Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
|
@ -107,7 +107,7 @@ struct amps_attach_args {
|
|||
bus_space_tag_t aa_iot; /* bus space tag */
|
||||
unsigned int aa_base; /* base address for port */
|
||||
int aa_port; /* serial port number */
|
||||
int aa_irq; /* IRQ number */
|
||||
podulebus_intr_handle_t aa_irq; /* IRQ number */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -221,6 +221,7 @@ amps_shutdown(arg)
|
|||
struct com_amps_softc {
|
||||
struct com_softc sc_com; /* real "com" softc */
|
||||
void *sc_ih; /* interrupt handler */
|
||||
struct evcnt sc_intrcnt; /* interrupt count */
|
||||
};
|
||||
|
||||
/* Prototypes for functions */
|
||||
|
@ -313,6 +314,8 @@ com_amps_attach(parent, self, aux)
|
|||
sc->sc_frequency = AMPS_FREQ;
|
||||
com_attach_subr(sc);
|
||||
|
||||
asc->sc_ih = intr_claim(aa->aa_irq, IPL_SERIAL, "com",
|
||||
comintr, sc);
|
||||
evcnt_attach_dynamic(&asc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
|
||||
self->dv_xname, "intr");
|
||||
asc->sc_ih = podulebus_irq_establish(aa->aa_irq, IPL_SERIAL, comintr,
|
||||
sc, &asc->sc_intrcnt);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: csa.c,v 1.9 2001/03/17 20:34:44 bjh21 Exp $ */
|
||||
/* $NetBSD: csa.c,v 1.10 2001/03/18 16:58:55 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -86,6 +86,7 @@ int csa_match __P((struct device *, struct cfdata *, void *));
|
|||
struct csa_softc {
|
||||
struct ncr5380_softc sc_ncr5380;
|
||||
void *sc_ih;
|
||||
struct evcnt sc_intrcnt;
|
||||
int sc_podule_number;
|
||||
podule_t *sc_podule;
|
||||
volatile u_char *sc_irqstatus;
|
||||
|
@ -192,8 +193,10 @@ csa_attach(parent, self, aux)
|
|||
sc->sc_irqstatus = (u_char *)pa->pa_podule->slow_base + CSA_INTR_OFFSET;
|
||||
sc->sc_irqmask = CSA_INTR_MASK;
|
||||
|
||||
sc->sc_ih = intr_claim(pa->pa_podule->interrupt, IPL_BIO, "csa",
|
||||
csa_intr, sc);
|
||||
evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
|
||||
self->dv_xname, "intr");
|
||||
sc->sc_ih = podulebus_irq_establish(pa->pa_ih, IPL_BIO, csa_intr, sc,
|
||||
&sc->sc_intrcnt);
|
||||
if (sc->sc_ih == NULL)
|
||||
sc->sc_ncr5380.sc_flags |= NCR5380_FORCE_POLLING;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: csc.c,v 1.10 2001/03/17 20:34:44 bjh21 Exp $ */
|
||||
/* $NetBSD: csc.c,v 1.11 2001/03/18 16:58:56 bjh21 Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -181,13 +181,6 @@ cscattach(pdp, dp, auxp)
|
|||
|
||||
printf(": host=%d", sc->sc_softc.sc_link.scsipi_scsi.adapter_target);
|
||||
|
||||
sc->sc_softc.sc_ih.ih_func = csc_intr;
|
||||
sc->sc_softc.sc_ih.ih_arg = &sc->sc_softc;
|
||||
sc->sc_softc.sc_ih.ih_level = IPL_BIO;
|
||||
sc->sc_softc.sc_ih.ih_name = "scsi: csc";
|
||||
sc->sc_softc.sc_ih.ih_maskaddr = sc->sc_specific.sc_podule->irq_addr;
|
||||
sc->sc_softc.sc_ih.ih_maskbits = sc->sc_specific.sc_podule->irq_mask;
|
||||
|
||||
/* initialise the alatch */
|
||||
sc->sc_specific.sc_alatch_defs = (CSC_POLL?0:CSC_ALATCH_DEFS_INTEN);
|
||||
for (loop = 0; loop < 8; loop ++) {
|
||||
|
@ -197,7 +190,11 @@ cscattach(pdp, dp, auxp)
|
|||
}
|
||||
|
||||
#if CSC_POLL == 0
|
||||
if (irq_claim(IRQ_PODULE, &sc->sc_softc.sc_ih))
|
||||
evcnt_attach_dynamic(&sc->sc_softc.sc_intrcnt, EVCNT_TYPE_INTR, NULL,
|
||||
dp->dv_xname, "intr");
|
||||
sc->sc_softc.sc_ih = podulebus_irq_establish(pa->pa_ih, IPL_BIO,
|
||||
csc_intr, &sc->sc_softc, &sc->sc_softc.sc_intrcnt);
|
||||
if (sc->sc_softc.sc_ih == NULL)
|
||||
panic("%s: Cannot install IRQ handler\n", dp->dv_xname);
|
||||
#else
|
||||
printf(" polling");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_ne_pbus.c,v 1.6 2001/03/17 20:34:44 bjh21 Exp $ */
|
||||
/* $NetBSD: if_ne_pbus.c,v 1.7 2001/03/18 16:58:56 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -91,6 +91,7 @@ struct ne_pbus_softc {
|
|||
podule_t *sc_podule;
|
||||
struct bus_space sc_tag; /* Patched tag */
|
||||
void *sc_ih; /* Interrupt handler */
|
||||
struct evcnt sc_intrcnt; /* Interrupt count */
|
||||
int sc_mediatype; /* Media Info */
|
||||
#define NE_MEDIA_AUTO 0
|
||||
#define NE_MEDIA_10BASET 1
|
||||
|
@ -311,8 +312,10 @@ ne_pbus_attach(parent, self, aux)
|
|||
ne->postattach(npsc);
|
||||
|
||||
/* Install an interrupt handler */
|
||||
npsc->sc_ih = intr_claim(npsc->sc_podule->interrupt, IPL_NET,
|
||||
"if_ne", dp8390_intr, dsc);
|
||||
evcnt_attach_dynamic(&npsc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
|
||||
self->dv_xname, "intr");
|
||||
npsc->sc_ih = podulebus_irq_establish(pa->pa_ih, IPL_NET, dp8390_intr,
|
||||
dsc, &npsc->sc_intrcnt);
|
||||
if (npsc->sc_ih == NULL)
|
||||
panic("%s: Cannot install interrupt handler",
|
||||
dsc->sc_dev.dv_xname);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ptsc.c,v 1.27 2001/03/17 20:34:45 bjh21 Exp $ */
|
||||
/* $NetBSD: ptsc.c,v 1.28 2001/03/18 16:58:56 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Scott Stevens
|
||||
|
@ -188,21 +188,17 @@ ptscattach(pdp, dp, auxp)
|
|||
|
||||
printf(": host=%d", sc->sc_softc.sc_link.scsipi_scsi.adapter_target);
|
||||
|
||||
sc->sc_softc.sc_ih.ih_func = ptsc_intr;
|
||||
sc->sc_softc.sc_ih.ih_arg = &sc->sc_softc;
|
||||
sc->sc_softc.sc_ih.ih_level = IPL_BIO;
|
||||
sc->sc_softc.sc_ih.ih_name = "scsi: ptsc";
|
||||
sc->sc_softc.sc_ih.ih_maskaddr = sc->sc_specific.sc_podule->irq_addr;
|
||||
sc->sc_softc.sc_ih.ih_maskbits = sc->sc_specific.sc_podule->irq_mask;
|
||||
|
||||
/* initialise the card */
|
||||
/* *rp->term = 0;*/
|
||||
*rp->inten = (PTSC_POLL?0:1);
|
||||
*rp->led = 0;
|
||||
|
||||
#if PTSC_POLL == 0
|
||||
if (irq_claim(IRQ_PODULE /*IRQ_EXPCARD0 + sc->sc_specific.sc_podule_number */,
|
||||
&sc->sc_softc.sc_ih))
|
||||
evcnt_attach_dynamic(&sc->sc_softc.sc_intrcnt, EVCNT_TYPE_INTR, NULL,
|
||||
dp->dv_xname, "intr");
|
||||
sc->sc_softc.sc_ih = podulebus_irq_establish(pa->pa_ih, IPL_BIO,
|
||||
ptsc_intr, &sc->sc_softc, &sc->sc_softc.sc_intrcnt);
|
||||
if (sc->sc_softc.sc_ih == NULL)
|
||||
panic("%s: Cannot install IRQ handler\n", dp->dv_xname);
|
||||
#else
|
||||
printf(" polling");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sfasvar.h,v 1.6 1998/11/19 21:45:00 thorpej Exp $ */
|
||||
/* $NetBSD: sfasvar.h,v 1.7 2001/03/18 16:58:56 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Daniel Widenfalk
|
||||
|
@ -157,7 +157,8 @@ struct sfas_softc {
|
|||
struct device sc_dev; /* System required struct */
|
||||
struct scsipi_link sc_link; /* For sub devices */
|
||||
struct scsipi_adapter sc_adapter;
|
||||
irqhandler_t sc_ih; /* Interrupt chain struct */
|
||||
void *sc_ih;
|
||||
struct evcnt sc_intrcnt;
|
||||
|
||||
TAILQ_HEAD(,sfas_pending) sc_xs_pending;
|
||||
TAILQ_HEAD(,sfas_pending) sc_xs_free;
|
||||
|
|
Loading…
Reference in New Issue