svn commit: r194650 - head/sys/arm/xscale/ixp425
Sam Leffler
sam at FreeBSD.org
Mon Jun 22 20:34:00 UTC 2009
Author: sam
Date: Mon Jun 22 20:33:59 2009
New Revision: 194650
URL: http://svn.freebsd.org/changeset/base/194650
Log:
move logic to ACK a GPIO to a separate function
Modified:
head/sys/arm/xscale/ixp425/ixp425.c
Modified: head/sys/arm/xscale/ixp425/ixp425.c
==============================================================================
--- head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:31:06 2009 (r194649)
+++ head/sys/arm/xscale/ixp425/ixp425.c Mon Jun 22 20:33:59 2009 (r194650)
@@ -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
More information about the svn-src-all
mailing list