summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2005-02-22 23:54:29 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2005-02-22 23:54:29 +0000
commitb37922fc4373a931b94f0ee29a8f4d5b01e58fab (patch)
tree4c6c10c6d489d142145bd9dfc0bfc60090061f79
parent069b355470bc98d7f039fc29fc4848fef264c52a (diff)
Interrupt naming as provided by other interrupt handlers.
-rw-r--r--sys/arch/arm/xscale/pxa2x0_gpio.c16
-rw-r--r--sys/arch/arm/xscale/pxa2x0_gpio.h3
2 files changed, 17 insertions, 2 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0_gpio.c b/sys/arch/arm/xscale/pxa2x0_gpio.c
index e440fc160c8..3491667bbdd 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.14 2005/02/17 22:05:56 dlg Exp $ */
+/* $OpenBSD: pxa2x0_gpio.c,v 1.15 2005/02/22 23:54:28 drahn Exp $ */
/* $NetBSD: pxa2x0_gpio.c,v 1.2 2003/07/15 00:24:55 lukem Exp $ */
/*
@@ -330,6 +330,20 @@ pxa2x0_gpio_intr_disestablish(void *cookie)
FREE(gh, M_DEVBUF);
}
+const char *
+pxa2x0_gpio_intr_string(void *cookie)
+{
+ static char irqstr[32];
+ struct gpio_irq_handler *gh = cookie;
+
+ if (gh == NULL)
+ snprintf(irqstr, sizeof irqstr, "couldn't establish interrupt");
+ else
+ snprintf(irqstr, sizeof irqstr, "irq %ld", gh->gh_irq);
+ return(irqstr);
+}
+
+
static int
gpio_intr0(void *arg)
{
diff --git a/sys/arch/arm/xscale/pxa2x0_gpio.h b/sys/arch/arm/xscale/pxa2x0_gpio.h
index 59eecf0e7ce..e015648954b 100644
--- a/sys/arch/arm/xscale/pxa2x0_gpio.h
+++ b/sys/arch/arm/xscale/pxa2x0_gpio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_gpio.h,v 1.3 2005/01/14 00:55:11 drahn Exp $ */
+/* $OpenBSD: pxa2x0_gpio.h,v 1.4 2005/02/22 23:54:28 drahn Exp $ */
/* $wasabi$ */
/*
@@ -64,5 +64,6 @@ void pxa2x0_gpio_clear_intr(u_int gpio);
void *pxa2x0_gpio_intr_establish(u_int, int, int, int (*)(void *), void *,
char *);
void pxa2x0_gpio_intr_disestablish(void *);
+const char *pxa2x0_gpio_intr_string(void *cookie);
#endif /* _PXA2X0_GPIO_H */