]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Fix OMAP GPIO interrupts on 16xx
authorTony Lindgren <tony@atomide.com>
Thu, 19 Jan 2006 23:18:24 +0000 (15:18 -0800)
committerTony Lindgren <tony@atomide.com>
Thu, 19 Jan 2006 23:18:24 +0000 (15:18 -0800)
GPIO interrupt edge configuration broke on 16xx after
"IRQ type flags" patch because 16xx was wrongly assuming
the IRQT bits would match the hardware bits.

arch/arm/plat-omap/gpio.c

index efba09370751763c54e13e79f16b441a50c5a6bf..cf5ad2965c21c21af3839279c6205d11657a8176 100644 (file)
@@ -448,11 +448,14 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger)
                /* We allow only edge triggering, i.e. two lowest bits */
                if (trigger & ~IRQT_BOTHEDGE)
                        BUG();
-               /* NOTE: knows __IRQT_{FAL,RIS}EDGE match OMAP hardware */
-               trigger &= 0x03;
                l = __raw_readl(reg);
                l &= ~(3 << (gpio << 1));
-               l |= trigger << (gpio << 1);
+               if (trigger == IRQT_RISING)
+                       l |= 2 << gpio;
+               else if (trigger == IRQT_FALLING)
+                       l |= 1 << gpio;
+               else
+                       goto bad;
                break;
        case METHOD_GPIO_730:
                reg += OMAP730_GPIO_INT_CONTROL;