From: Tony Lindgren Date: Thu, 19 Jan 2006 23:18:24 +0000 (-0800) Subject: ARM: OMAP: Fix OMAP GPIO interrupts on 16xx X-Git-Tag: v2.6.16-omap1~123 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b8656042e3496ade9d55cda123e4ef85483e9ab5;p=linux-2.6-omap-h63xx.git ARM: OMAP: Fix OMAP GPIO interrupts on 16xx 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. --- diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index efba0937075..cf5ad2965c2 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -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;