diff options
Diffstat (limited to 'arch/arm/plat-nomadik/gpio.c')
-rw-r--r-- | arch/arm/plat-nomadik/gpio.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c index a9ee9889a833..4c3ea1a922ac 100644 --- a/arch/arm/plat-nomadik/gpio.c +++ b/arch/arm/plat-nomadik/gpio.c | |||
@@ -211,21 +211,27 @@ static struct irq_chip nmk_gpio_irq_chip = { | |||
211 | static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | 211 | static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) |
212 | { | 212 | { |
213 | struct nmk_gpio_chip *nmk_chip; | 213 | struct nmk_gpio_chip *nmk_chip; |
214 | struct irq_chip *host_chip; | 214 | struct irq_chip *host_chip = get_irq_chip(irq); |
215 | unsigned int gpio_irq; | 215 | unsigned int gpio_irq; |
216 | u32 pending; | 216 | u32 pending; |
217 | unsigned int first_irq; | 217 | unsigned int first_irq; |
218 | 218 | ||
219 | if (host_chip->mask_ack) | ||
220 | host_chip->mask_ack(irq); | ||
221 | else { | ||
222 | host_chip->mask(irq); | ||
223 | if (host_chip->ack) | ||
224 | host_chip->ack(irq); | ||
225 | } | ||
226 | |||
219 | nmk_chip = get_irq_data(irq); | 227 | nmk_chip = get_irq_data(irq); |
220 | first_irq = NOMADIK_GPIO_TO_IRQ(nmk_chip->chip.base); | 228 | first_irq = NOMADIK_GPIO_TO_IRQ(nmk_chip->chip.base); |
221 | while ( (pending = readl(nmk_chip->addr + NMK_GPIO_IS)) ) { | 229 | while ( (pending = readl(nmk_chip->addr + NMK_GPIO_IS)) ) { |
222 | gpio_irq = first_irq + __ffs(pending); | 230 | gpio_irq = first_irq + __ffs(pending); |
223 | generic_handle_irq(gpio_irq); | 231 | generic_handle_irq(gpio_irq); |
224 | } | 232 | } |
225 | if (0) {/* don't ack parent irq, as ack == disable */ | 233 | |
226 | host_chip = get_irq_chip(irq); | 234 | host_chip->unmask(irq); |
227 | host_chip->ack(irq); | ||
228 | } | ||
229 | } | 235 | } |
230 | 236 | ||
231 | static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip) | 237 | static int nmk_gpio_init_irq(struct nmk_gpio_chip *nmk_chip) |