summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm/xscale/pxa2x0_pcic.c19
-rw-r--r--sys/arch/sparc/dev/ts102.c14
-rw-r--r--sys/dev/isa/i82365_isa.c7
-rw-r--r--sys/dev/isa/i82365_isapnp.c3
-rw-r--r--sys/dev/isa/i82365_isasubr.c17
-rw-r--r--sys/dev/isa/i82365_isavar.h3
-rw-r--r--sys/dev/isa/tcic2_isa.c21
-rw-r--r--sys/dev/pci/i82365_pci.c3
-rw-r--r--sys/dev/pci/pccbb.c18
-rw-r--r--sys/dev/pcmcia/pcmcia.c10
-rw-r--r--sys/dev/pcmcia/pcmciachip.h6
-rw-r--r--sys/dev/pcmcia/pcmciavar.h3
-rw-r--r--sys/dev/sbus/stp4020.c15
13 files changed, 119 insertions, 20 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0_pcic.c b/sys/arch/arm/xscale/pxa2x0_pcic.c
index 30a80e16089..c0c6dbf297b 100644
--- a/sys/arch/arm/xscale/pxa2x0_pcic.c
+++ b/sys/arch/arm/xscale/pxa2x0_pcic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_pcic.c,v 1.6 2005/01/18 16:26:36 drahn Exp $ */
+/* $OpenBSD: pxa2x0_pcic.c,v 1.7 2005/01/27 17:03:23 millert Exp $ */
/*
* Copyright (c) Dale Rahn <drahn@openbsd.org>
*
@@ -54,6 +54,7 @@ void pxapcic_io_unmap(pcmcia_chipset_handle_t, int);
void *pxapcic_intr_establish(pcmcia_chipset_handle_t,
struct pcmcia_function *, int, int (*)(void *), void *, char *);
void pxapcic_intr_disestablish(pcmcia_chipset_handle_t, void *);
+const char *pxapcic_intr_string(pcmcia_chipset_handle_t, void *);
void pxapcic_socket_enable(pcmcia_chipset_handle_t);
void pxapcic_socket_disable(pcmcia_chipset_handle_t);
@@ -99,6 +100,7 @@ struct pcmcia_chip_functions pxapcic_pcmcia_functions = {
pxapcic_intr_establish,
pxapcic_intr_disestablish,
+ pxapcic_intr_string,
pxapcic_socket_enable,
pxapcic_socket_disable,
@@ -263,6 +265,21 @@ pxapcic_intr_disestablish(pch, ih)
pxa2x0_gpio_intr_disestablish(ih);
}
+const char *
+pxapcic_intr_string(pch, ih)
+ pcmcia_chipset_handle_t pch;
+ void *ih;
+{
+ struct pxapcic_socket *so = pch;
+ static char irqstr[64];
+
+ if (ih == NULL)
+ snprintf(irqstr, sizeof(irqstr), "couldn't establish interrupt");
+ else
+ snprintf(irqstr, sizeof(irqstr), "irq %d", so->irqpin);
+ return (irqstr);
+}
+
void
pxapcic_socket_enable(pch)
pcmcia_chipset_handle_t pch;
diff --git a/sys/arch/sparc/dev/ts102.c b/sys/arch/sparc/dev/ts102.c
index 34af52583a3..17668d571e2 100644
--- a/sys/arch/sparc/dev/ts102.c
+++ b/sys/arch/sparc/dev/ts102.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ts102.c,v 1.13 2004/09/29 07:35:11 miod Exp $ */
+/* $OpenBSD: ts102.c,v 1.14 2005/01/27 17:03:23 millert Exp $ */
/*
* Copyright (c) 2003, 2004, Miodrag Vallat.
*
@@ -139,6 +139,7 @@ int tslot_intr(void *);
void tslot_intr_disestablish(pcmcia_chipset_handle_t, void *);
void *tslot_intr_establish(pcmcia_chipset_handle_t, struct pcmcia_function *,
int, int (*)(void *), void *, char *);
+const char *tslot_intr_string(pcmcia_chipset_handle_t, void *);
int tslot_io_alloc(pcmcia_chipset_handle_t, bus_addr_t, bus_size_t,
bus_size_t, struct pcmcia_io_handle *);
void tslot_io_free(pcmcia_chipset_handle_t, struct pcmcia_io_handle *);
@@ -183,6 +184,7 @@ struct pcmcia_chip_functions tslot_functions = {
tslot_intr_establish,
tslot_intr_disestablish,
+ tslot_intr_string,
tslot_slot_enable,
tslot_slot_disable
@@ -778,6 +780,16 @@ tslot_intr_disestablish(pcmcia_chipset_handle_t pch, void *ih)
td->td_intrarg = NULL;
}
+const char *
+tslot_intr_string(pcmcia_chipset_handle_t pch, void *ih)
+{
+ if (ih == NULL)
+ return ("couldn't establish interrupt");
+ else
+ return (""); /* nothing for now */
+}
+
+
void *
tslot_intr_establish(pcmcia_chipset_handle_t pch, struct pcmcia_function *pf,
int ipl, int (*handler)(void *), void *arg, char *xname)
diff --git a/sys/dev/isa/i82365_isa.c b/sys/dev/isa/i82365_isa.c
index 1a770e40ee0..4752201ad3a 100644
--- a/sys/dev/isa/i82365_isa.c
+++ b/sys/dev/isa/i82365_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365_isa.c,v 1.18 2004/01/09 21:32:23 brad Exp $ */
+/* $OpenBSD: i82365_isa.c,v 1.19 2005/01/27 17:03:23 millert Exp $ */
/* $NetBSD: i82365_isa.c,v 1.11 1998/06/09 07:25:00 thorpej Exp $ */
/*
@@ -61,10 +61,6 @@
int pcic_isa_probe(struct device *, void *, void *);
void pcic_isa_attach(struct device *, struct device *, void *);
-void *pcic_isa_chip_intr_establish(pcmcia_chipset_handle_t,
- struct pcmcia_function *, int, int (*) (void *), void *, char *);
-void pcic_isa_chip_intr_disestablish(pcmcia_chipset_handle_t, void *);
-
struct cfattach pcic_isa_ca = {
sizeof(struct pcic_softc), pcic_isa_probe, pcic_isa_attach
};
@@ -82,6 +78,7 @@ static struct pcmcia_chip_functions pcic_isa_functions = {
pcic_isa_chip_intr_establish,
pcic_isa_chip_intr_disestablish,
+ pcic_isa_chip_intr_string,
pcic_chip_socket_enable,
pcic_chip_socket_disable,
diff --git a/sys/dev/isa/i82365_isapnp.c b/sys/dev/isa/i82365_isapnp.c
index a2cbea41ff6..834bda5b8a3 100644
--- a/sys/dev/isa/i82365_isapnp.c
+++ b/sys/dev/isa/i82365_isapnp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365_isapnp.c,v 1.5 2004/01/09 21:32:23 brad Exp $ */
+/* $OpenBSD: i82365_isapnp.c,v 1.6 2005/01/27 17:03:23 millert Exp $ */
/* $NetBSD: i82365_isapnp.c,v 1.8 2000/02/23 17:22:11 soren Exp $ */
/*
@@ -84,6 +84,7 @@ static struct pcmcia_chip_functions pcic_isa_functions = {
pcic_isa_chip_intr_establish,
pcic_isa_chip_intr_disestablish,
+ pcic_isa_chip_intr_string,
pcic_chip_socket_enable,
pcic_chip_socket_disable,
diff --git a/sys/dev/isa/i82365_isasubr.c b/sys/dev/isa/i82365_isasubr.c
index 62dcae47ddc..45c1709e5e5 100644
--- a/sys/dev/isa/i82365_isasubr.c
+++ b/sys/dev/isa/i82365_isasubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365_isasubr.c,v 1.19 2005/01/27 17:01:31 millert Exp $ */
+/* $OpenBSD: i82365_isasubr.c,v 1.20 2005/01/27 17:03:23 millert Exp $ */
/* $NetBSD: i82365_isasubr.c,v 1.1 1998/06/07 18:28:31 sommerfe Exp $ */
/*
@@ -234,6 +234,21 @@ pcic_isa_chip_intr_disestablish(pch, ih)
pcic_write(h, PCIC_INTR, reg);
}
+const char *
+pcic_isa_chip_intr_string(pch, ih)
+ pcmcia_chipset_handle_t pch;
+ void *ih;
+{
+ struct pcic_handle *h = (struct pcic_handle *)pch;
+ static char irqstr[64];
+
+ if (ih == NULL)
+ snprintf(irqstr, sizeof(irqstr), "couldn't establish interrupt");
+ else
+ snprintf(irqstr, sizeof(irqstr), "irq %d", h->ih_irq);
+ return (irqstr);
+}
+
int
pcic_intr_probe(v)
void *v;
diff --git a/sys/dev/isa/i82365_isavar.h b/sys/dev/isa/i82365_isavar.h
index fad174e6139..7b5f0ec9f72 100644
--- a/sys/dev/isa/i82365_isavar.h
+++ b/sys/dev/isa/i82365_isavar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365_isavar.h,v 1.6 2002/03/14 03:16:05 millert Exp $ */
+/* $OpenBSD: i82365_isavar.h,v 1.7 2005/01/27 17:03:23 millert Exp $ */
/* $NetBSD: i82365_isavar.h,v 1.1 1998/06/07 18:28:31 sommerfe Exp $ */
/*
@@ -41,6 +41,7 @@ extern int npcic_isa_intr_list;
void *pcic_isa_chip_intr_establish(pcmcia_chipset_handle_t,
struct pcmcia_function *, int, int (*) (void *), void *, char *);
void pcic_isa_chip_intr_disestablish(pcmcia_chipset_handle_t, void *);
+const char *pcic_isa_chip_intr_string(pcmcia_chipset_handle_t, void *);
/*
* Figure out how wide the ISA bus is...
diff --git a/sys/dev/isa/tcic2_isa.c b/sys/dev/isa/tcic2_isa.c
index ed093552eae..168365ec281 100644
--- a/sys/dev/isa/tcic2_isa.c
+++ b/sys/dev/isa/tcic2_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcic2_isa.c,v 1.6 2004/01/09 21:32:24 brad Exp $ */
+/* $OpenBSD: tcic2_isa.c,v 1.7 2005/01/27 17:03:23 millert Exp $ */
/* $NetBSD: tcic2_isa.c,v 1.2 1999/04/08 16:14:29 bad Exp $ */
#undef TCICISADEBUG
@@ -112,6 +112,7 @@ void tcic_isa_attach(struct device *, struct device *, void *);
void *tcic_isa_chip_intr_establish(pcmcia_chipset_handle_t,
struct pcmcia_function *, int, int (*) (void *), void *, char *);
void tcic_isa_chip_intr_disestablish(pcmcia_chipset_handle_t, void *);
+const char *tcic_isa_chip_intr_string(pcmcia_chipset_handle_t, void *);
struct cfattach tcic_isa_ca = {
sizeof(struct tcic_softc), tcic_isa_probe, tcic_isa_attach
@@ -130,6 +131,7 @@ static struct pcmcia_chip_functions tcic_isa_functions = {
tcic_isa_chip_intr_establish,
tcic_isa_chip_intr_disestablish,
+ tcic_isa_chip_intr_string,
tcic_chip_socket_enable,
tcic_chip_socket_disable,
@@ -218,7 +220,7 @@ tcic_isa_attach(parent, self, aux)
sc->memsize2 = tcic_log2((u_int)ia->ia_msize);
sc->intr_est = ic;
- sc->pct = (pcmcia_chipset_tag_t) & tcic_isa_functions;
+ sc->pct = (pcmcia_chipset_tag_t) &tcic_isa_functions;
sc->iot = iot;
sc->ioh = ioh;
@@ -372,3 +374,18 @@ tcic_isa_chip_intr_disestablish(pch, ih)
isa_intr_disestablish(h->sc->intr_est, ih);
}
+
+const char *
+tcic_isa_chip_intr_string(pch, ih)
+ pcmcia_chipset_handle_t pch;
+ void *ih;
+{
+ struct tcic_handle *h = (struct tcic_handle *) pch;
+ static char irqstr[64];
+
+ if (ih == NULL)
+ snprintf(irqstr, sizeof(irqstr), "couldn't establish interrupt");
+ else
+ snprintf(irqstr, sizeof(irqstr), "irq %d", h->ih_irq);
+ return (irqstr);
+}
diff --git a/sys/dev/pci/i82365_pci.c b/sys/dev/pci/i82365_pci.c
index 96aa21d3b60..20e90dd07f0 100644
--- a/sys/dev/pci/i82365_pci.c
+++ b/sys/dev/pci/i82365_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365_pci.c,v 1.7 2002/11/19 18:40:17 jason Exp $ */
+/* $OpenBSD: i82365_pci.c,v 1.8 2005/01/27 17:03:23 millert Exp $ */
/* $NetBSD: i82365_pci.c,v 1.11 2000/02/24 03:42:44 itohy Exp $ */
/*
@@ -78,6 +78,7 @@ static struct pcmcia_chip_functions pcic_pci_functions = {
/* XXX */
pcic_isa_chip_intr_establish,
pcic_isa_chip_intr_disestablish,
+ pcic_isa_chip_intr_string,
pcic_chip_socket_enable,
pcic_chip_socket_disable,
diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c
index 138d88e8aae..7d2f064f439 100644
--- a/sys/dev/pci/pccbb.c
+++ b/sys/dev/pci/pccbb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccbb.c,v 1.34 2004/07/14 21:54:18 mickey Exp $ */
+/* $OpenBSD: pccbb.c,v 1.35 2005/01/27 17:03:23 millert Exp $ */
/* $NetBSD: pccbb.c,v 1.96 2004/03/28 09:49:31 nakayama Exp $ */
/*
@@ -153,8 +153,8 @@ int pccbb_pcmcia_io_map(pcmcia_chipset_handle_t, int, bus_addr_t,
void pccbb_pcmcia_io_unmap(pcmcia_chipset_handle_t, int);
void *pccbb_pcmcia_intr_establish(pcmcia_chipset_handle_t,
struct pcmcia_function *, int, int (*)(void *), void *, char *);
-void pccbb_pcmcia_intr_disestablish(pcmcia_chipset_handle_t,
- void *);
+void pccbb_pcmcia_intr_disestablish(pcmcia_chipset_handle_t, void *);
+const char *pccbb_pcmcia_intr_string(pcmcia_chipset_handle_t, void *);
void pccbb_pcmcia_socket_enable(pcmcia_chipset_handle_t);
void pccbb_pcmcia_socket_disable(pcmcia_chipset_handle_t);
int pccbb_pcmcia_card_detect(pcmcia_chipset_handle_t pch);
@@ -214,6 +214,7 @@ static struct pcmcia_chip_functions pccbb_pcmcia_funcs = {
pccbb_pcmcia_io_unmap,
pccbb_pcmcia_intr_establish,
pccbb_pcmcia_intr_disestablish,
+ pccbb_pcmcia_intr_string,
pccbb_pcmcia_socket_enable,
pccbb_pcmcia_socket_disable,
pccbb_pcmcia_card_detect
@@ -2852,6 +2853,17 @@ pccbb_pcmcia_intr_disestablish(pch, ih)
pccbb_intr_disestablish(sc, ih);
}
+const char *
+pccbb_pcmcia_intr_string(pch, ih)
+ pcmcia_chipset_handle_t pch;
+ void *ih;
+{
+ if (ih == NULL)
+ return "couldn't establish interrupt";
+ else
+ return ""; /* card shares interrupt of the bridge */
+}
+
#if rbus
/*
* int
diff --git a/sys/dev/pcmcia/pcmcia.c b/sys/dev/pcmcia/pcmcia.c
index 1ac0b049569..faa63d647cf 100644
--- a/sys/dev/pcmcia/pcmcia.c
+++ b/sys/dev/pcmcia/pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia.c,v 1.33 2002/11/19 18:36:18 jason Exp $ */
+/* $OpenBSD: pcmcia.c,v 1.34 2005/01/27 17:03:23 millert Exp $ */
/* $NetBSD: pcmcia.c,v 1.9 1998/08/13 02:10:55 eeh Exp $ */
/*
@@ -869,6 +869,14 @@ pcmcia_intr_disestablish(pf, ih)
pcmcia_chip_intr_disestablish(pf->sc->pct, pf->sc->pch, ih);
}
+const char *
+pcmcia_intr_string(pf, ih)
+ struct pcmcia_function *pf;
+ void *ih;
+{
+ return pcmcia_chip_intr_string(pf->sc->pct, pf->sc->pch, ih);
+}
+
int
pcmcia_card_intr(arg)
void *arg;
diff --git a/sys/dev/pcmcia/pcmciachip.h b/sys/dev/pcmcia/pcmciachip.h
index 47882bd6515..1afc0b4e988 100644
--- a/sys/dev/pcmcia/pcmciachip.h
+++ b/sys/dev/pcmcia/pcmciachip.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmciachip.h,v 1.6 2002/03/14 03:16:07 millert Exp $ */
+/* $OpenBSD: pcmciachip.h,v 1.7 2005/01/27 17:03:23 millert Exp $ */
/* $NetBSD: pcmciachip.h,v 1.5 2000/01/13 08:58:51 joda Exp $ */
/*
@@ -85,6 +85,7 @@ struct pcmcia_chip_functions {
void *(*intr_establish)(pcmcia_chipset_handle_t,
struct pcmcia_function *, int, int (*)(void *), void *, char *);
void (*intr_disestablish)(pcmcia_chipset_handle_t, void *);
+ const char *(*intr_string)(pcmcia_chipset_handle_t, void *);
/* card enable/disable */
void (*socket_enable)(pcmcia_chipset_handle_t);
@@ -131,6 +132,9 @@ struct pcmcia_chip_functions {
#define pcmcia_chip_intr_disestablish(tag, handle, ih) \
((*(tag)->intr_disestablish)((handle), (ih)))
+#define pcmcia_chip_intr_string(tag, handle, ih) \
+ ((*(tag)->intr_string)((handle), (ih)))
+
/* Socket functions. */
#define pcmcia_chip_socket_enable(tag, handle) \
((*(tag)->socket_enable)((handle)))
diff --git a/sys/dev/pcmcia/pcmciavar.h b/sys/dev/pcmcia/pcmciavar.h
index 7aeecd781a0..4bd4c7b0158 100644
--- a/sys/dev/pcmcia/pcmciavar.h
+++ b/sys/dev/pcmcia/pcmciavar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmciavar.h,v 1.17 2002/11/19 18:36:18 jason Exp $ */
+/* $OpenBSD: pcmciavar.h,v 1.18 2005/01/27 17:03:23 millert Exp $ */
/* $NetBSD: pcmciavar.h,v 1.5 1998/07/19 17:28:17 christos Exp $ */
/*
@@ -275,3 +275,4 @@ int pcmcia_io_map(struct pcmcia_function *, int, bus_addr_t,
void *pcmcia_intr_establish(struct pcmcia_function *, int,
int (*) (void *), void *, char *);
void pcmcia_intr_disestablish(struct pcmcia_function *, void *);
+const char *pcmcia_intr_string(struct pcmcia_function *, void *);
diff --git a/sys/dev/sbus/stp4020.c b/sys/dev/sbus/stp4020.c
index c9617ad0264..86fc55aa4fc 100644
--- a/sys/dev/sbus/stp4020.c
+++ b/sys/dev/sbus/stp4020.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stp4020.c,v 1.12 2004/03/03 21:47:39 miod Exp $ */
+/* $OpenBSD: stp4020.c,v 1.13 2005/01/27 17:03:24 millert Exp $ */
/* $NetBSD: stp4020.c,v 1.23 2002/06/01 23:51:03 lukem Exp $ */
/*-
@@ -120,6 +120,7 @@ void stp4020_chip_socket_disable(pcmcia_chipset_handle_t);
void *stp4020_chip_intr_establish(pcmcia_chipset_handle_t,
struct pcmcia_function *, int, int (*) (void *), void *, char *);
void stp4020_chip_intr_disestablish(pcmcia_chipset_handle_t, void *);
+const char *stp4020_chip_intr_string(pcmcia_chipset_handle_t, void *);
/* Our PCMCIA chipset methods */
static struct pcmcia_chip_functions stp4020_functions = {
@@ -135,6 +136,7 @@ static struct pcmcia_chip_functions stp4020_functions = {
stp4020_chip_intr_establish,
stp4020_chip_intr_disestablish,
+ stp4020_chip_intr_string,
stp4020_chip_socket_enable,
stp4020_chip_socket_disable
@@ -834,6 +836,17 @@ stp4020_chip_intr_disestablish(pch, ih)
h->intrarg = NULL;
}
+const char *
+stp4020_chip_intr_string(pch, ih)
+ pcmcia_chipset_handle_t pch;
+ void *ih;
+{
+ if (ih == NULL)
+ return ("couldn't establish interrupt");
+ else
+ return (""); /* nothing for now */
+}
+
/*
* Delay and possibly yield CPU.
* XXX - assumes a context