diff options
author | sam <sam@FreeBSD.org> | 2009-06-22 20:33:59 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-06-22 20:33:59 +0000 |
commit | 28b9b94c036b245284f1082b2c035d4b8d7e732f (patch) | |
tree | 689544aa3d7d19a57aeca7b32bbd62a30353a1a5 /sys/arm | |
parent | 7a46e0bad61bb7dfeceecd031f488b33dafb30f2 (diff) | |
download | FreeBSD-src-28b9b94c036b245284f1082b2c035d4b8d7e732f.zip FreeBSD-src-28b9b94c036b245284f1082b2c035d4b8d7e732f.tar.gz |
move logic to ACK a GPIO to a separate function
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/xscale/ixp425/ixp425.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/arm/xscale/ixp425/ixp425.c b/sys/arm/xscale/ixp425/ixp425.c index 42ee81d..0a21131 100644 --- a/sys/arm/xscale/ixp425/ixp425.c +++ b/sys/arm/xscale/ixp425/ixp425.c @@ -159,6 +159,14 @@ DB_SHOW_COMMAND(gpio, db_show_gpio) } #endif +static __inline void +ixp425_gpio_ack(int irq) +{ + if (irq < 32 && ((1 << irq) & IXP425_INT_GPIOMASK)) + IXPREG(IXP425_GPIO_VBASE + IXP425_GPIO_GPISR) = + ixp425_irq2gpio_bit(irq); +} + void arm_mask_irq(uintptr_t nb) { @@ -174,9 +182,7 @@ arm_mask_irq(uintptr_t nb) } restore_interrupts(i); /*XXX; If it's a GPIO interrupt, ACK it know. Can it be a problem ?*/ - if (nb < 32 && ((1 << nb) & IXP425_INT_GPIOMASK)) - IXPREG(IXP425_GPIO_VBASE + IXP425_GPIO_GPISR) = - ixp425_irq2gpio_bit(nb); + ixp425_gpio_ack(nb); } void |