Skip to content

Commit

Permalink
ARM: tegra: update GPIO chained IRQ handler to use entry/exit functions
Browse files Browse the repository at this point in the history
This patch updates the Tegra gpio chained IRQ handler to use the chained
IRQ enter/exit functions in order to function correctly on primary
controllers with different methods of flow control.

This is required for the GIC to move to fasteoi interrupt handling.

Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
Will Deacon committed May 11, 2011
1 parent adfed15 commit 9802294
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions arch/arm/mach-tegra/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include <linux/io.h>
#include <linux/gpio.h>

#include <asm/mach/irq.h>

#include <mach/iomap.h>
#include <mach/suspend.h>

Expand Down Expand Up @@ -221,8 +223,9 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
int port;
int pin;
int unmasked = 0;
struct irq_chip *chip = irq_desc_get_chip(desc);

desc->irq_data.chip->irq_ack(&desc->irq_data);
chained_irq_enter(chip, desc);

bank = irq_get_handler_data(irq);

Expand All @@ -241,15 +244,15 @@ static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
*/
if (lvl & (0x100 << pin)) {
unmasked = 1;
desc->irq_data.chip->irq_unmask(&desc->irq_data);
chained_irq_exit(chip, desc);
}

generic_handle_irq(gpio_to_irq(gpio + pin));
}
}

if (!unmasked)
desc->irq_data.chip->irq_unmask(&desc->irq_data);
chained_irq_exit(chip, desc);

}

Expand Down

0 comments on commit 9802294

Please sign in to comment.