summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-27 22:25:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-27 22:25:39 +0000
commitef0751a00264284557874522612da95509e828dd (patch)
tree963caf63773429b742a670cf2a175ca710090c48 /sys/arch
parent4e3636249abafe45a4830cc8448aa18fc5853660 (diff)
from netbsd:
The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/isa/pckbd.c4
-rw-r--r--sys/arch/alpha/pci/pci_2100_a50.c9
-rw-r--r--sys/arch/alpha/pci/pci_axppci_33.c9
-rw-r--r--sys/arch/alpha/pci/pci_kn20aa.c10
-rw-r--r--sys/arch/alpha/pci/pcivga.c5
-rw-r--r--sys/arch/alpha/pci/sio_pic.c33
6 files changed, 33 insertions, 37 deletions
diff --git a/sys/arch/alpha/isa/pckbd.c b/sys/arch/alpha/isa/pckbd.c
index cea8cd5f5de..ab269620ef7 100644
--- a/sys/arch/alpha/isa/pckbd.c
+++ b/sys/arch/alpha/isa/pckbd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbd.c,v 1.2 1995/11/23 02:37:06 cgd Exp $ */
+/* $NetBSD: pckbd.c,v 1.3 1995/12/24 02:29:35 mycroft Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles Hannum. All rights reserved.
@@ -348,7 +348,7 @@ pckbdattach(parent, self, aux)
pckbd_pio_arg = ida->ida_pioarg; /* XXX */
sc->sc_ih = ISA_INTR_ESTABLISH(pckbd_intr_fns, pckbd_intr_arg,
- ida->ida_irq[0], ISA_IST_EDGE, ISA_IPL_TTY, pckbdintr, sc);
+ ida->ida_irq[0], IST_EDGE, IPL_TTY, pckbdintr, sc);
#if NWSC
printf("\n");
wscattach_input(self, self, pccngetc, pccnpollc);
diff --git a/sys/arch/alpha/pci/pci_2100_a50.c b/sys/arch/alpha/pci/pci_2100_a50.c
index c33a9a83b0e..20267d06cce 100644
--- a/sys/arch/alpha/pci/pci_2100_a50.c
+++ b/sys/arch/alpha/pci/pci_2100_a50.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_2100_a50.c,v 1.3 1995/11/23 02:37:49 cgd Exp $ */
+/* $NetBSD: pci_2100_a50.c,v 1.4 1995/12/24 02:29:42 mycroft Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@@ -47,7 +47,7 @@
#include "sio.h"
void *dec_2100_a50_pci_map_int __P((void *, pci_conftag_t,
- pci_intr_pin_t, pci_intr_line_t, pci_intrlevel_t,
+ pci_intr_pin_t, pci_intr_line_t, int,
int (*func)(void *), void *));
void dec_2100_a50_pci_unmap_int __P((void *, void *));
@@ -62,7 +62,7 @@ dec_2100_a50_pci_map_int(acv, tag, pin, line, level, func, arg)
pci_conftag_t tag;
pci_intr_pin_t pin;
pci_intr_line_t line;
- pci_intrlevel_t level;
+ int level;
int (*func) __P((void *));
void *arg;
{
@@ -151,8 +151,7 @@ dec_2100_a50_pci_map_int(acv, tag, pin, line, level, func, arg)
#if NSIO
return ISA_INTR_ESTABLISH(&sio_isa_intr_fns, NULL, /* XXX */
- pirqline, ISA_IST_LEVEL, pci_intrlevel_to_isa(level),
- func, arg);
+ pirqline, IST_LEVEL, level, func, arg);
#else
panic("dec_2100_a50_pci_map_int: no sio!");
#endif
diff --git a/sys/arch/alpha/pci/pci_axppci_33.c b/sys/arch/alpha/pci/pci_axppci_33.c
index 74fb338e91f..3f606fd16f8 100644
--- a/sys/arch/alpha/pci/pci_axppci_33.c
+++ b/sys/arch/alpha/pci/pci_axppci_33.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_axppci_33.c,v 1.1 1995/11/23 02:37:54 cgd Exp $ */
+/* $NetBSD: pci_axppci_33.c,v 1.2 1995/12/24 02:29:43 mycroft Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@@ -48,7 +48,7 @@
#include "sio.h"
void *dec_axppci_33_pci_map_int __P((void *, pci_conftag_t,
- pci_intr_pin_t, pci_intr_line_t, pci_intrlevel_t,
+ pci_intr_pin_t, pci_intr_line_t, int,
int (*func)(void *), void *));
void dec_axppci_33_pci_unmap_int __P((void *, void *));
@@ -63,7 +63,7 @@ dec_axppci_33_pci_map_int(lcv, tag, pin, line, level, func, arg)
pci_conftag_t tag;
pci_intr_pin_t pin;
pci_intr_line_t line;
- pci_intrlevel_t level;
+ int level;
int (*func) __P((void *));
void *arg;
{
@@ -158,8 +158,7 @@ dec_axppci_33_pci_map_int(lcv, tag, pin, line, level, func, arg)
#if NSIO
return ISA_INTR_ESTABLISH(&sio_isa_intr_fns, NULL, /* XXX */
- pirqline, ISA_IST_LEVEL, pci_intrlevel_to_isa(level),
- func, arg);
+ pirqline, IST_LEVEL, level, func, arg);
#else
panic("dec_axppci_33_pci_map_int: no sio!");
#endif
diff --git a/sys/arch/alpha/pci/pci_kn20aa.c b/sys/arch/alpha/pci/pci_kn20aa.c
index c5c64d636b8..7d521dbeac9 100644
--- a/sys/arch/alpha/pci/pci_kn20aa.c
+++ b/sys/arch/alpha/pci/pci_kn20aa.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_kn20aa.c,v 1.1 1995/11/23 02:38:00 cgd Exp $ */
+/* $NetBSD: pci_kn20aa.c,v 1.2 1995/12/24 02:29:45 mycroft Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@@ -56,7 +56,7 @@
#endif
void *kn20aa_pci_map_int __P((void *, pci_conftag_t, pci_intr_pin_t,
- pci_intr_line_t, pci_intrlevel_t, int (*func)(void *), void *));
+ pci_intr_line_t, int, int (*func)(void *), void *));
void kn20aa_pci_unmap_int __P((void *, void *));
__const struct pci_intr_fns kn20aa_pci_intr_fns = {
@@ -87,7 +87,7 @@ void kn20aa_pci_strayintr __P((int irq));
void kn20aa_iointr __P((void *framep, int vec));
void kn20aa_enable_intr __P((int irq));
struct kn20aa_intrhand *kn20aa_attach_intr __P((struct kn20aa_intrchain *,
- pci_intrlevel_t, int (*) (void *), void *));
+ int, int (*) (void *), void *));
void
pci_kn20aa_pickintr(pcf, pcfa, ppf, ppfa, pifp, pifap)
@@ -127,7 +127,7 @@ kn20aa_pci_map_int(ccv, tag, pin, line, level, func, arg)
pci_conftag_t tag;
pci_intr_pin_t pin;
pci_intr_line_t line;
- pci_intrlevel_t level;
+ int level;
int (*func) __P((void *));
void *arg;
{
@@ -275,7 +275,7 @@ kn20aa_enable_intr(irq)
struct kn20aa_intrhand *
kn20aa_attach_intr(chain, level, func, arg)
struct kn20aa_intrchain *chain;
- pci_intrlevel_t level;
+ int level;
int (*func) __P((void *));
void *arg;
{
diff --git a/sys/arch/alpha/pci/pcivga.c b/sys/arch/alpha/pci/pcivga.c
index 10b2f3cbbec..049a9d99429 100644
--- a/sys/arch/alpha/pci/pcivga.c
+++ b/sys/arch/alpha/pci/pcivga.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pcivga.c,v 1.3 1995/11/23 02:38:11 cgd Exp $ */
+/* $NetBSD: pcivga.c,v 1.4 1995/12/24 02:29:47 mycroft Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@@ -180,8 +180,7 @@ pcivgaattach(parent, self, aux)
#if 0
pci_intrdata = pci_conf_read(sc->sc_pcitag, PCI_INTERRUPT_REG);
if (PCI_INTERRUPT_PIN(pci_intrdata) != PCI_INTERRUPT_PIN_NONE) {
- sc->sc_intr = pci_map_int(sc->sc_pcitag, PCI_IPL_TTY,
- tgaintr, sc);
+ sc->sc_intr = pci_map_int(sc->sc_pcitag, IPL_TTY, tgaintr, sc);
if (sc->sc_intr == NULL)
printf("%s: WARNING: couldn't map interrupt\n",
sc->sc_dev.dv_xname);
diff --git a/sys/arch/alpha/pci/sio_pic.c b/sys/arch/alpha/pci/sio_pic.c
index ec24ec96c5c..b7d7af43858 100644
--- a/sys/arch/alpha/pci/sio_pic.c
+++ b/sys/arch/alpha/pci/sio_pic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sio_pic.c,v 1.2 1995/11/23 02:38:19 cgd Exp $ */
+/* $NetBSD: sio_pic.c,v 1.3 1995/12/24 02:29:49 mycroft Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@@ -57,8 +57,7 @@
* Private functions and variables.
*/
static void *sio_intr_establish __P((void *, isa_irq_t,
- isa_intrsharetype_t, isa_intrlevel_t,
- int (*)(void *), void *));
+ int, int, int (*)(void *), void *));
static void sio_intr_disestablish __P((void *, void *));
static void sio_strayintr __P((isa_irq_t));
@@ -89,7 +88,7 @@ struct intrhand {
#define ICU_LEN 16 /* number of ISA IRQs */
static struct intrhand *sio_intrhand[ICU_LEN];
-static isa_intrsharetype_t sio_intrsharetype[ICU_LEN];
+static int sio_intrsharetype[ICU_LEN];
static u_long sio_strayintrcnt[ICU_LEN];
#ifdef EVCNT_COUNTERS
struct evcnt sio_intr_evcnt;
@@ -126,7 +125,7 @@ u_int8_t initial_elcr[2];
void
sio_setirqstat(irq, enabled, type)
int irq, enabled;
- isa_intrsharetype_t type;
+ int type;
{
u_int8_t ocw1[2], elcr[2];
int icu, bit;
@@ -157,7 +156,7 @@ sio_setirqstat(irq, enabled, type)
/*
* interrupt type select: set bit to get level-triggered.
*/
- if (type == ISA_IST_LEVEL)
+ if (type == IST_LEVEL)
elcr[icu] |= 1 << bit;
else
elcr[icu] &= ~(1 << bit);
@@ -235,7 +234,7 @@ sio_intr_setup(ipf, ipfa)
*/
if (INITIALLY_LEVEL_TRIGGERED(i))
printf("sio_intr_setup: %d LT!\n", i);
- sio_setirqstat(i, INITIALLY_ENABLED(i), ISA_IST_EDGE);
+ sio_setirqstat(i, INITIALLY_ENABLED(i), IST_EDGE);
break;
case 2:
@@ -247,7 +246,7 @@ sio_intr_setup(ipf, ipfa)
printf("sio_intr_setup: %d LT!\n", i);
if (!INITIALLY_ENABLED(i))
printf("sio_intr_setup: %d not enabled!\n", i);
- sio_setirqstat(i, 1, ISA_IST_EDGE);
+ sio_setirqstat(i, 1, IST_EDGE);
break;
default:
@@ -256,8 +255,8 @@ sio_intr_setup(ipf, ipfa)
* type to (effectively) "unknown."
*/
sio_setirqstat(i, INITIALLY_ENABLED(i),
- INITIALLY_LEVEL_TRIGGERED(i) ? ISA_IST_LEVEL :
- ISA_IST_NONE);
+ INITIALLY_LEVEL_TRIGGERED(i) ? IST_LEVEL :
+ IST_NONE);
break;
}
}
@@ -267,8 +266,8 @@ void *
sio_intr_establish(siifa, irq, type, level, ih_fun, ih_arg)
void *siifa;
isa_irq_t irq;
- isa_intrsharetype_t type;
- isa_intrlevel_t level;
+ int type;
+ int level;
int (*ih_fun)(void *);
void *ih_arg;
{
@@ -280,16 +279,16 @@ sio_intr_establish(siifa, irq, type, level, ih_fun, ih_arg)
if (ih == NULL)
panic("sio_intr_establish: can't malloc handler info");
- if (irq > ICU_LEN || type == ISA_IST_NONE)
+ if (irq > ICU_LEN || type == IST_NONE)
panic("sio_intr_establish: bogus irq or type");
switch (sio_intrsharetype[irq]) {
- case ISA_IST_EDGE:
- case ISA_IST_LEVEL:
+ case IST_EDGE:
+ case IST_LEVEL:
if (type == sio_intrsharetype[irq])
break;
- case ISA_IST_PULSE:
- if (type != ISA_IST_NONE)
+ case IST_PULSE:
+ if (type != IST_NONE)
panic("intr_establish: can't share %s with %s",
isa_intrsharetype_name(sio_intrsharetype[irq]),
isa_intrsharetype_name(type));