Pickup IRQ number from configuration file via mainbus_attach_args
instead being fixed in a header file.
This commit is contained in:
parent
e766702f7e
commit
b702c67c74
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: com.c,v 1.1 1996/01/31 23:24:23 mark Exp $ */
|
||||
/* $NetBSD: com.c,v 1.2 1996/03/06 23:30:58 mark Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -228,7 +228,9 @@ comattach(parent, self, aux)
|
||||
sc->sc_ih.ih_func = comintr;
|
||||
sc->sc_ih.ih_arg = sc;
|
||||
sc->sc_ih.ih_level = IPL_TTY;
|
||||
irq_claim(IRQ_SERIAL, &sc->sc_ih);
|
||||
if (mb->mb_irq != IRQUNK)
|
||||
if (irq_claim(mb->mb_irq, &sc->sc_ih))
|
||||
panic("Cannot claim IRQ %d for com%d\n", mb->mb_irq, sc->sc_dev.dv_unit);
|
||||
|
||||
#ifdef KGDB
|
||||
if (kgdb_dev == makedev(commajor, unit)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lpt.c,v 1.2 1996/02/15 21:33:52 mark Exp $ */
|
||||
/* $NetBSD: lpt.c,v 1.3 1996/03/06 23:31:03 mark Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Mark Brinicombe
|
||||
@ -49,8 +49,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from:$NetBSD: lpt.c,v 1.2 1996/02/15 21:33:52 mark Exp $
|
||||
* $Id: lpt.c,v 1.2 1996/02/15 21:33:52 mark Exp $
|
||||
* from:$NetBSD: lpt.c,v 1.3 1996/03/06 23:31:03 mark Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -321,7 +320,9 @@ lptattach(parent, self, aux)
|
||||
#else
|
||||
sc->sc_ih.ih_level = IPL_NONE;
|
||||
#endif
|
||||
irq_claim(mb->mb_irq, &sc->sc_ih);
|
||||
if (irq_claim(mb->mb_irq, &sc->sc_ih))
|
||||
panic("Cannot claim IRQ %d for lpt%d\n", mb->mb_irq, sc->sc_dev.dv_unit);
|
||||
|
||||
}
|
||||
#if defined(INET) && defined(PLIP)
|
||||
else {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wd.c,v 1.2 1996/02/22 23:03:44 mark Exp $ */
|
||||
/* $NetBSD: wd.c,v 1.3 1996/03/06 23:31:05 mark Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -255,8 +255,8 @@ wdcattach(parent, self, aux)
|
||||
wdc->sc_ih.ih_func = wdcintr;
|
||||
wdc->sc_ih.ih_arg = wdc;
|
||||
wdc->sc_ih.ih_level = IPL_BIO;
|
||||
if (irq_claim(IRQ_HD, &wdc->sc_ih) == -1)
|
||||
panic("Cannot installed HD IRQ handler\n");
|
||||
if (irq_claim(mb->mb_irq, &wdc->sc_ih))
|
||||
panic("Cannot claim IRQ %d for wdc%d\n", mb->mb_irq, parent->dv_unit);
|
||||
|
||||
for (wa.wa_drive = 0; wa.wa_drive < 2; wa.wa_drive++)
|
||||
(void)config_found(self, (void *)&wa, wdprint);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: com.c,v 1.1 1996/01/31 23:24:23 mark Exp $ */
|
||||
/* $NetBSD: com.c,v 1.2 1996/03/06 23:30:58 mark Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -228,7 +228,9 @@ comattach(parent, self, aux)
|
||||
sc->sc_ih.ih_func = comintr;
|
||||
sc->sc_ih.ih_arg = sc;
|
||||
sc->sc_ih.ih_level = IPL_TTY;
|
||||
irq_claim(IRQ_SERIAL, &sc->sc_ih);
|
||||
if (mb->mb_irq != IRQUNK)
|
||||
if (irq_claim(mb->mb_irq, &sc->sc_ih))
|
||||
panic("Cannot claim IRQ %d for com%d\n", mb->mb_irq, sc->sc_dev.dv_unit);
|
||||
|
||||
#ifdef KGDB
|
||||
if (kgdb_dev == makedev(commajor, unit)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fd.c,v 1.1 1996/01/31 23:24:37 mark Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.2 1996/03/06 23:31:01 mark Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994, 1995 Charles Hannum.
|
||||
@ -37,8 +37,6 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
*
|
||||
* $Id: fd.c,v 1.1 1996/01/31 23:24:37 mark Exp $
|
||||
*/
|
||||
|
||||
/* The new config stuff do no use to use and need to be pulled out */
|
||||
@ -323,7 +321,8 @@ fdcattach(parent, self, aux)
|
||||
fdc->sc_ih.ih_func = fdcintr;
|
||||
fdc->sc_ih.ih_arg = fdc;
|
||||
fdc->sc_ih.ih_level = IPL_BIO;
|
||||
irq_claim(IRQ_FLOPPY, &fdc->sc_ih);
|
||||
if (irq_claim(mb->mb_irq, &fdc->sc_ih))
|
||||
panic("Cannot claim IRQ %d for fdc%d\n", mb->mb_irq, parent->dv_unit);
|
||||
|
||||
/*
|
||||
* The NVRAM info only tells us about the first two disks on the
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lpt.c,v 1.2 1996/02/15 21:33:52 mark Exp $ */
|
||||
/* $NetBSD: lpt.c,v 1.3 1996/03/06 23:31:03 mark Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Mark Brinicombe
|
||||
@ -49,8 +49,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from:$NetBSD: lpt.c,v 1.2 1996/02/15 21:33:52 mark Exp $
|
||||
* $Id: lpt.c,v 1.2 1996/02/15 21:33:52 mark Exp $
|
||||
* from:$NetBSD: lpt.c,v 1.3 1996/03/06 23:31:03 mark Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -321,7 +320,9 @@ lptattach(parent, self, aux)
|
||||
#else
|
||||
sc->sc_ih.ih_level = IPL_NONE;
|
||||
#endif
|
||||
irq_claim(mb->mb_irq, &sc->sc_ih);
|
||||
if (irq_claim(mb->mb_irq, &sc->sc_ih))
|
||||
panic("Cannot claim IRQ %d for lpt%d\n", mb->mb_irq, sc->sc_dev.dv_unit);
|
||||
|
||||
}
|
||||
#if defined(INET) && defined(PLIP)
|
||||
else {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wd.c,v 1.2 1996/02/22 23:03:44 mark Exp $ */
|
||||
/* $NetBSD: wd.c,v 1.3 1996/03/06 23:31:05 mark Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -255,8 +255,8 @@ wdcattach(parent, self, aux)
|
||||
wdc->sc_ih.ih_func = wdcintr;
|
||||
wdc->sc_ih.ih_arg = wdc;
|
||||
wdc->sc_ih.ih_level = IPL_BIO;
|
||||
if (irq_claim(IRQ_HD, &wdc->sc_ih) == -1)
|
||||
panic("Cannot installed HD IRQ handler\n");
|
||||
if (irq_claim(mb->mb_irq, &wdc->sc_ih))
|
||||
panic("Cannot claim IRQ %d for wdc%d\n", mb->mb_irq, parent->dv_unit);
|
||||
|
||||
for (wa.wa_drive = 0; wa.wa_drive < 2; wa.wa_drive++)
|
||||
(void)config_found(self, (void *)&wa, wdprint);
|
||||
|
Loading…
Reference in New Issue
Block a user