Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/pnpbios Allow pnpbios_getirqnum() to return th...
details: https://anonhg.NetBSD.org/src/rev/bcf1b3e91cc2
branches: trunk
changeset: 485204:bcf1b3e91cc2
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Apr 22 06:38:24 2000 +0000
description:
Allow pnpbios_getirqnum() to return the share type, as well.
diffstat:
sys/arch/i386/pnpbios/ess_pnpbios.c | 8 +++++---
sys/arch/i386/pnpbios/pnpbios.c | 10 +++++++---
sys/arch/i386/pnpbios/pnpbiosvar.h | 5 +++--
sys/arch/i386/pnpbios/sb_pnpbios.c | 5 +++--
sys/arch/i386/pnpbios/wss_pnpbios.c | 4 ++--
sys/arch/i386/pnpbios/ym_pnpbios.c | 4 ++--
6 files changed, 22 insertions(+), 14 deletions(-)
diffs (135 lines):
diff -r 99f3806db1ba -r bcf1b3e91cc2 sys/arch/i386/pnpbios/ess_pnpbios.c
--- a/sys/arch/i386/pnpbios/ess_pnpbios.c Sat Apr 22 03:01:22 2000 +0000
+++ b/sys/arch/i386/pnpbios/ess_pnpbios.c Sat Apr 22 06:38:24 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ess_pnpbios.c,v 1.3 2000/03/04 23:08:54 nathanw Exp $ */
+/* $NetBSD: ess_pnpbios.c,v 1.4 2000/04/22 06:38:24 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -101,12 +101,14 @@
sc->sc_audio1.ist = IST_EDGE;
sc->sc_audio2.ist = IST_EDGE;
- if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->sc_audio1.irq)) {
+ if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->sc_audio1.irq,
+ NULL)) {
printf(": can't get IRQ\n");
return;
}
- if (pnpbios_getirqnum(aa->pbt, aa->resc, 1, &sc->sc_audio2.irq))
+ if (pnpbios_getirqnum(aa->pbt, aa->resc, 1, &sc->sc_audio2.irq,
+ NULL))
sc->sc_audio2.irq = -1;
if (pnpbios_getdmachan(aa->pbt, aa->resc, 0, &sc->sc_audio1.drq)) {
diff -r 99f3806db1ba -r bcf1b3e91cc2 sys/arch/i386/pnpbios/pnpbios.c
--- a/sys/arch/i386/pnpbios/pnpbios.c Sat Apr 22 03:01:22 2000 +0000
+++ b/sys/arch/i386/pnpbios/pnpbios.c Sat Apr 22 06:38:24 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pnpbios.c,v 1.12 2000/03/01 20:23:55 groo Exp $ */
+/* $NetBSD: pnpbios.c,v 1.13 2000/04/22 06:38:24 thorpej Exp $ */
/*
* Copyright (c) 2000 Christian E. Hopps. All rights reserved.
* Copyright (c) 1999
@@ -1239,11 +1239,12 @@
}
int
-pnpbios_getirqnum(pbt, resc, idx, irqp)
+pnpbios_getirqnum(pbt, resc, idx, irqp, istp)
pnpbios_tag_t pbt;
struct pnpresources *resc;
int idx;
int *irqp;
+ int *istp;
{
struct pnp_irq *irq;
@@ -1254,7 +1255,10 @@
while (idx--)
irq = SIMPLEQ_NEXT(irq, next);
- *irqp = ffs(irq->mask) - 1;
+ if (irqp != NULL)
+ *irqp = ffs(irq->mask) - 1;
+ if (istp != NULL)
+ *istp = (irq->flags & 0x0c) ? IST_LEVEL : IST_EDGE;
return (0);
}
diff -r 99f3806db1ba -r bcf1b3e91cc2 sys/arch/i386/pnpbios/pnpbiosvar.h
--- a/sys/arch/i386/pnpbios/pnpbiosvar.h Sat Apr 22 03:01:22 2000 +0000
+++ b/sys/arch/i386/pnpbios/pnpbiosvar.h Sat Apr 22 06:38:24 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pnpbiosvar.h,v 1.3 2000/03/01 20:23:55 groo Exp $ */
+/* $NetBSD: pnpbiosvar.h,v 1.4 2000/04/22 06:38:24 thorpej Exp $ */
/*
* Copyright (c) 1999
* Matthias Drochner. All rights reserved.
@@ -94,7 +94,8 @@
int pnpbios_getiobase __P((pnpbios_tag_t, struct pnpresources *, int,
bus_space_tag_t *, int *));
-int pnpbios_getirqnum __P((pnpbios_tag_t, struct pnpresources *, int, int *));
+int pnpbios_getirqnum __P((pnpbios_tag_t, struct pnpresources *, int, int *,
+ int *));
int pnpbios_getdmachan __P((pnpbios_tag_t, struct pnpresources *, int, int *));
void pnpbios_print_devres __P((struct device *,
struct pnpbiosdev_attach_args *));
diff -r 99f3806db1ba -r bcf1b3e91cc2 sys/arch/i386/pnpbios/sb_pnpbios.c
--- a/sys/arch/i386/pnpbios/sb_pnpbios.c Sat Apr 22 03:01:22 2000 +0000
+++ b/sys/arch/i386/pnpbios/sb_pnpbios.c Sat Apr 22 06:38:24 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sb_pnpbios.c,v 1.2 1999/11/14 02:15:51 thorpej Exp $ */
+/* $NetBSD: sb_pnpbios.c,v 1.3 2000/04/22 06:38:24 thorpej Exp $ */
/*
* Copyright (c) 1999
* Matthias Drochner. All rights reserved.
@@ -89,7 +89,8 @@
/* XXX These are only for setting chip configuration registers. */
pnpbios_getiobase(aa->pbt, aa->resc, 0, 0, &sc->sc_iobase);
- if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->sc_irq)) {
+ if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->sc_irq,
+ NULL)) {
printf(": can't get IRQ\n");
return;
}
diff -r 99f3806db1ba -r bcf1b3e91cc2 sys/arch/i386/pnpbios/wss_pnpbios.c
--- a/sys/arch/i386/pnpbios/wss_pnpbios.c Sat Apr 22 03:01:22 2000 +0000
+++ b/sys/arch/i386/pnpbios/wss_pnpbios.c Sat Apr 22 06:38:24 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wss_pnpbios.c,v 1.3 2000/02/20 22:03:49 groo Exp $ */
+/* $NetBSD: wss_pnpbios.c,v 1.4 2000/04/22 06:38:24 thorpej Exp $ */
/*
* Copyright (c) 1999
* Matthias Drochner. All rights reserved.
@@ -131,7 +131,7 @@
sc->wss_ic = aa->ic;
- if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->wss_irq)) {
+ if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->wss_irq, NULL)) {
printf(": can't get IRQ\n");
return;
}
diff -r 99f3806db1ba -r bcf1b3e91cc2 sys/arch/i386/pnpbios/ym_pnpbios.c
--- a/sys/arch/i386/pnpbios/ym_pnpbios.c Sat Apr 22 03:01:22 2000 +0000
+++ b/sys/arch/i386/pnpbios/ym_pnpbios.c Sat Apr 22 06:38:24 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ym_pnpbios.c,v 1.2 1999/11/14 02:15:51 thorpej Exp $ */
+/* $NetBSD: ym_pnpbios.c,v 1.3 2000/04/22 06:38:25 thorpej Exp $ */
/*
* Copyright (c) 1999
* Matthias Drochner. All rights reserved.
@@ -118,7 +118,7 @@
sc->sc_ic = aa->ic;
- if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->ym_irq)) {
+ if (pnpbios_getirqnum(aa->pbt, aa->resc, 0, &sc->ym_irq, NULL)) {
printf(": can't get IRQ\n");
return;
}
Home |
Main Index |
Thread Index |
Old Index