Commit b8656042 authored by Tony Lindgren's avatar Tony Lindgren

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.
parent 0ea830d8
...@@ -448,11 +448,14 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) ...@@ -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 */ /* We allow only edge triggering, i.e. two lowest bits */
if (trigger & ~IRQT_BOTHEDGE) if (trigger & ~IRQT_BOTHEDGE)
BUG(); BUG();
/* NOTE: knows __IRQT_{FAL,RIS}EDGE match OMAP hardware */
trigger &= 0x03;
l = __raw_readl(reg); l = __raw_readl(reg);
l &= ~(3 << (gpio << 1)); 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; break;
case METHOD_GPIO_730: case METHOD_GPIO_730:
reg += OMAP730_GPIO_INT_CONTROL; reg += OMAP730_GPIO_INT_CONTROL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment