diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-01-27 17:03:25 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-01-27 17:03:25 +0000 |
commit | 7b4677abf4abc2b0e1c8b1d23b4f711f4839f65c (patch) | |
tree | a873aec91b706115de534c5732ac00b9bf1dd03d /sys/arch/arm | |
parent | 7ff5140d1641cb333749e5f6eea39ad4eb1ede09 (diff) |
Add pcmcia_intr_string() to format the intr string for pcmcia attach
routines.
Diffstat (limited to 'sys/arch/arm')
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_pcic.c | 19 |
1 files changed, 18 insertions, 1 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; |