Date: Mon, 22 Jun 2009 20:34:00 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r194650 - head/sys/arm/xscale/ixp425 Message-ID: <200906222034.n5MKY0fB051734@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906222034.n5MKY0fB051734>