Commit af8d97c9 authored by Kevin Hilman's avatar Kevin Hilman

davinci: fixups for banked GPIO interrupt handling

This patch seems to get me much more reliable performance using the
GPIO banked interrupts on dm355 for the dm9000 driver.

Changes include:

- init GPIO handling along with normal GPIO init
- mask the level-sensitive bank IRQ during handling
Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
parent 1ee23f33
...@@ -44,6 +44,7 @@ static struct gpio_controller *__iomem __init gpio2controller(unsigned gpio) ...@@ -44,6 +44,7 @@ static struct gpio_controller *__iomem __init gpio2controller(unsigned gpio)
return __gpio_to_controller(gpio); return __gpio_to_controller(gpio);
} }
static int __init davinci_gpio_irq_setup(void);
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
...@@ -149,6 +150,7 @@ static int __init davinci_gpio_setup(void) ...@@ -149,6 +150,7 @@ static int __init davinci_gpio_setup(void)
gpiochip_add(&chips[i].chip); gpiochip_add(&chips[i].chip);
} }
davinci_gpio_irq_setup();
return 0; return 0;
} }
pure_initcall(davinci_gpio_setup); pure_initcall(davinci_gpio_setup);
...@@ -230,6 +232,7 @@ gpio_irq_handler(unsigned irq, struct irq_desc *desc) ...@@ -230,6 +232,7 @@ gpio_irq_handler(unsigned irq, struct irq_desc *desc)
mask <<= 16; mask <<= 16;
/* temporarily mask (level sensitive) parent IRQ */ /* temporarily mask (level sensitive) parent IRQ */
desc->chip->mask(irq);
desc->chip->ack(irq); desc->chip->ack(irq);
while (1) { while (1) {
u32 status; u32 status;
...@@ -322,4 +325,3 @@ static int __init davinci_gpio_irq_setup(void) ...@@ -322,4 +325,3 @@ static int __init davinci_gpio_irq_setup(void)
return 0; return 0;
} }
arch_initcall(davinci_gpio_irq_setup);
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