summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2005-01-04 02:08:42 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2005-01-04 02:08:42 +0000
commitcf709d84469ff2887d6420fcbda81e062f173e2e (patch)
tree8635359dbe05c60d3f9474074fbd6a8e59661b31 /sys/arch
parent3a600ea67e25e6b4229ec7bbfbda1b63e5f027df (diff)
Add name argument to pxa2x0_intr_establish, which is standard for openbsd
interrupt handling.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/arm/sa11x0/sa11x0_ost.c6
-rw-r--r--sys/arch/arm/sa11x0/sa11x0_var.h4
-rw-r--r--sys/arch/arm/xscale/pxa2x0_com.c5
-rw-r--r--sys/arch/arm/xscale/pxa2x0_gpio.c8
-rw-r--r--sys/arch/arm/xscale/pxa2x0_intr.c10
-rw-r--r--sys/arch/arm/xscale/pxa2x0_intr.h4
6 files changed, 20 insertions, 17 deletions
diff --git a/sys/arch/arm/sa11x0/sa11x0_ost.c b/sys/arch/arm/sa11x0/sa11x0_ost.c
index c2baeba78fa..f84afe10675 100644
--- a/sys/arch/arm/sa11x0/sa11x0_ost.c
+++ b/sys/arch/arm/sa11x0/sa11x0_ost.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sa11x0_ost.c,v 1.2 2005/01/02 19:52:36 drahn Exp $ */
+/* $OpenBSD: sa11x0_ost.c,v 1.3 2005/01/04 02:08:41 drahn Exp $ */
/* $NetBSD: sa11x0_ost.c,v 1.11 2003/07/15 00:24:51 lukem Exp $ */
/*
@@ -252,8 +252,8 @@ cpu_initclocks()
saost_sc->sc_clock_count = TIMER_FREQUENCY / hz;
saost_sc->sc_statclock_count = TIMER_FREQUENCY / stathz;
- sa11x0_intr_establish(0, 26, 1, IPL_CLOCK, clockintr, 0);
- sa11x0_intr_establish(0, 27, 1, IPL_CLOCK, statintr, 0);
+ sa11x0_intr_establish(0, 26, 1, IPL_CLOCK, clockintr, 0, "clock");
+ sa11x0_intr_establish(0, 27, 1, IPL_CLOCK, statintr, 0, "stat");
bus_space_write_4(saost_sc->sc_iot, saost_sc->sc_ioh, SAOST_SR, 0xf);
bus_space_write_4(saost_sc->sc_iot, saost_sc->sc_ioh, SAOST_IR, 3);
diff --git a/sys/arch/arm/sa11x0/sa11x0_var.h b/sys/arch/arm/sa11x0/sa11x0_var.h
index eb536769c22..ed2434ba808 100644
--- a/sys/arch/arm/sa11x0/sa11x0_var.h
+++ b/sys/arch/arm/sa11x0/sa11x0_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sa11x0_var.h,v 1.2 2005/01/02 19:52:36 drahn Exp $ */
+/* $OpenBSD: sa11x0_var.h,v 1.3 2005/01/04 02:08:41 drahn Exp $ */
/* $NetBSD: sa11x0_var.h,v 1.4 2003/04/14 14:18:41 rjs Exp $ */
/*-
@@ -71,7 +71,7 @@ struct sa11x0_attach_args {
};
void *sa11x0_intr_establish(sa11x0_chipset_tag_t, int, int, int,
- int (*)(void *), void *);
+ int (*)(void *), void *, char *);
void sa11x0_intr_disestablish(sa11x0_chipset_tag_t, void *);
#endif /* _SA11X0_VAR_H */
diff --git a/sys/arch/arm/xscale/pxa2x0_com.c b/sys/arch/arm/xscale/pxa2x0_com.c
index 72821f3e4ea..9226eb33293 100644
--- a/sys/arch/arm/xscale/pxa2x0_com.c
+++ b/sys/arch/arm/xscale/pxa2x0_com.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_com.c,v 1.2 2005/01/02 19:52:36 drahn Exp $ */
+/* $OpenBSD: pxa2x0_com.c,v 1.3 2005/01/04 02:08:41 drahn Exp $ */
/* $NetBSD: pxa2x0_com.c,v 1.4 2003/07/15 00:24:55 lukem Exp $ */
/*
@@ -146,5 +146,6 @@ pxauart_attach(struct device *parent, struct device *self, void *aux)
com_attach_subr(sc);
- pxa2x0_intr_establish(pxa->pxa_intr, IPL_SERIAL, comintr, sc);
+ pxa2x0_intr_establish(pxa->pxa_intr, IPL_SERIAL, comintr, sc,
+ sc->sc_dev.dv_xname);
}
diff --git a/sys/arch/arm/xscale/pxa2x0_gpio.c b/sys/arch/arm/xscale/pxa2x0_gpio.c
index ac3b496f405..c11568d405b 100644
--- a/sys/arch/arm/xscale/pxa2x0_gpio.c
+++ b/sys/arch/arm/xscale/pxa2x0_gpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_gpio.c,v 1.2 2005/01/02 19:52:36 drahn Exp $ */
+/* $OpenBSD: pxa2x0_gpio.c,v 1.3 2005/01/04 02:08:41 drahn Exp $ */
/* $NetBSD: pxa2x0_gpio.c,v 1.2 2003/07/15 00:24:55 lukem Exp $ */
/*
@@ -173,7 +173,7 @@ pxagpio_attach(struct device *parent, struct device *self, void *aux)
#ifdef PXAGPIO_HAS_GPION_INTRS
sc->sc_irqcookie[2] = pxa2x0_intr_establish(PXA2X0_INT_GPION, IPL_BIO,
- gpio_intrN, sc);
+ gpio_intrN, sc, sc->sc_dev.dv_xname);
if (sc->sc_irqcookie[2] == NULL) {
printf("%s: failed to hook main GPIO interrupt\n",
sc->sc_dev.dv_xname);
@@ -240,13 +240,13 @@ pxa2x0_gpio_intr_establish(u_int gpio, int level, int spl, int (*func)(void *),
if (gpio == 0) {
KDASSERT(sc->sc_irqcookie[0] == NULL);
sc->sc_irqcookie[0] = pxa2x0_intr_establish(PXA2X0_INT_GPIO0,
- spl, gpio_intr0, sc);
+ spl, gpio_intr0, sc, sc->sc_dev.dv_xname);
KDASSERT(sc->sc_irqcookie[0]);
} else
if (gpio == 1) {
KDASSERT(sc->sc_irqcookie[1] == NULL);
sc->sc_irqcookie[1] = pxa2x0_intr_establish(PXA2X0_INT_GPIO1,
- spl, gpio_intr1, sc);
+ spl, gpio_intr1, sc, sc->sc_dev.dv_xname);
KDASSERT(sc->sc_irqcookie[1]);
}
diff --git a/sys/arch/arm/xscale/pxa2x0_intr.c b/sys/arch/arm/xscale/pxa2x0_intr.c
index 2d7cc9392d0..ebe2dfd8d75 100644
--- a/sys/arch/arm/xscale/pxa2x0_intr.c
+++ b/sys/arch/arm/xscale/pxa2x0_intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_intr.c,v 1.2 2005/01/02 19:52:36 drahn Exp $ */
+/* $OpenBSD: pxa2x0_intr.c,v 1.3 2005/01/04 02:08:41 drahn Exp $ */
/* $NetBSD: pxa2x0_intr.c,v 1.5 2003/07/15 00:24:55 lukem Exp $ */
/*
@@ -104,6 +104,7 @@ static struct {
#endif
void *cookie; /* NULL for stackframe */
/* struct evbnt ev; */
+ char *name;
} handler[ICU_LEN];
__volatile int softint_pending;
@@ -433,7 +434,7 @@ _setsoftintr(int si)
void *
pxa2x0_intr_establish(int irqno, int level,
- int (*func)(void *), void *cookie)
+ int (*func)(void *), void *cookie, char *name)
{
int psw;
@@ -444,6 +445,7 @@ pxa2x0_intr_establish(int irqno, int level,
handler[irqno].cookie = cookie;
handler[irqno].func = func;
+ handler[irqno].name = name;
extirq_level[irqno] = level;
pxa2x0_update_intr_masks(irqno, level);
@@ -459,8 +461,8 @@ pxa2x0_intr_establish(int irqno, int level,
*/
void *
sa11x0_intr_establish(sa11x0_chipset_tag_t ic, int irq, int type, int level,
- int (*ih_fun)(void *), void *ih_arg)
+ int (*ih_fun)(void *), void *ih_arg, char *name)
{
- return pxa2x0_intr_establish(irq, level, ih_fun, ih_arg);
+ return pxa2x0_intr_establish(irq, level, ih_fun, ih_arg, name);
}
diff --git a/sys/arch/arm/xscale/pxa2x0_intr.h b/sys/arch/arm/xscale/pxa2x0_intr.h
index aebb5a85d9d..6f3f183b64d 100644
--- a/sys/arch/arm/xscale/pxa2x0_intr.h
+++ b/sys/arch/arm/xscale/pxa2x0_intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_intr.h,v 1.2 2005/01/02 19:52:36 drahn Exp $ */
+/* $OpenBSD: pxa2x0_intr.h,v 1.3 2005/01/04 02:08:41 drahn Exp $ */
/* $NetBSD: pxa2x0_intr.h,v 1.4 2003/07/05 06:53:08 dogcow Exp $ */
/* Derived from i80321_intr.h */
@@ -184,7 +184,7 @@ void pxa2x0_intr_bootstrap(vaddr_t);
void pxa2x0_irq_handler(void *);
void *pxa2x0_intr_establish(int irqno, int level,
- int (*func)(void *), void *cookie);
+ int (*func)(void *), void *cookie, char *name);
void pxa2x0_update_intr_masks(int irqno, int level);
extern __volatile int current_spl_level;