Commit 1907d8be authored by Thomas Gleixner's avatar Thomas Gleixner

bfin: Final irq cleanup

Use the trigger type in irq_data and check level type instead of
looking at desc->handle_irq.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: uclinux-dist-devel@blackfin.uclinux.org
parent a6e120ed
...@@ -154,13 +154,13 @@ void platform_clear_ipi(unsigned int cpu, int irq) ...@@ -154,13 +154,13 @@ void platform_clear_ipi(unsigned int cpu, int irq)
void __cpuinit bfin_local_timer_setup(void) void __cpuinit bfin_local_timer_setup(void)
{ {
#if defined(CONFIG_TICKSOURCE_CORETMR) #if defined(CONFIG_TICKSOURCE_CORETMR)
struct irq_chip *chip = get_irq_chip(IRQ_CORETMR); struct irq_data *data = irq_get_irq_data(IRQ_CORETMR);
struct irq_desc *desc = irq_to_desc(IRQ_CORETMR); struct irq_chip *chip = irq_data_get_irq_chip(data);
bfin_coretmr_init(); bfin_coretmr_init();
bfin_coretmr_clockevent_init(); bfin_coretmr_clockevent_init();
chip->irq_unmask(&desc->irq_data); chip->irq_unmask(data);
#else #else
/* Power down the core timer, just to play safe. */ /* Power down the core timer, just to play safe. */
bfin_write_TCNTL(0); bfin_write_TCNTL(0);
......
...@@ -578,10 +578,9 @@ static void bfin_gpio_ack_irq(struct irq_data *d) ...@@ -578,10 +578,9 @@ static void bfin_gpio_ack_irq(struct irq_data *d)
static void bfin_gpio_mask_ack_irq(struct irq_data *d) static void bfin_gpio_mask_ack_irq(struct irq_data *d)
{ {
unsigned int irq = d->irq; unsigned int irq = d->irq;
struct irq_desc *desc = irq_to_desc(irq);
u32 gpionr = irq_to_gpio(irq); u32 gpionr = irq_to_gpio(irq);
if (desc->handle_irq == handle_edge_irq) if (!irqd_is_level_type(d))
set_gpio_data(gpionr, 0); set_gpio_data(gpionr, 0);
set_gpio_maska(gpionr, 0); set_gpio_maska(gpionr, 0);
...@@ -837,12 +836,11 @@ void init_pint_lut(void) ...@@ -837,12 +836,11 @@ void init_pint_lut(void)
static void bfin_gpio_ack_irq(struct irq_data *d) static void bfin_gpio_ack_irq(struct irq_data *d)
{ {
struct irq_desc *desc = irq_to_desc(d->irq);
u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS]; u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
u32 pintbit = PINT_BIT(pint_val); u32 pintbit = PINT_BIT(pint_val);
u32 bank = PINT_2_BANK(pint_val); u32 bank = PINT_2_BANK(pint_val);
if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
if (pint[bank]->invert_set & pintbit) if (pint[bank]->invert_set & pintbit)
pint[bank]->invert_clear = pintbit; pint[bank]->invert_clear = pintbit;
else else
...@@ -854,12 +852,11 @@ static void bfin_gpio_ack_irq(struct irq_data *d) ...@@ -854,12 +852,11 @@ static void bfin_gpio_ack_irq(struct irq_data *d)
static void bfin_gpio_mask_ack_irq(struct irq_data *d) static void bfin_gpio_mask_ack_irq(struct irq_data *d)
{ {
struct irq_desc *desc = irq_to_desc(d->irq);
u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS]; u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
u32 pintbit = PINT_BIT(pint_val); u32 pintbit = PINT_BIT(pint_val);
u32 bank = PINT_2_BANK(pint_val); u32 bank = PINT_2_BANK(pint_val);
if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
if (pint[bank]->invert_set & pintbit) if (pint[bank]->invert_set & pintbit)
pint[bank]->invert_clear = pintbit; pint[bank]->invert_clear = pintbit;
else else
......
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