aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-03-24 12:21:01 -0400
committerThomas Gleixner <tglx@linutronix.de>2011-03-29 08:47:59 -0400
commit1907d8be2d54de461c682ee2fac45d97c29fd5dd (patch)
treeb10a0c3c5136a3d453903df8e97e9b572b63016e /arch/blackfin
parenta6e120ed42004d6051fff7c3233e2554f12ccecb (diff)
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: Thomas Gleixner <tglx@linutronix.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: uclinux-dist-devel@blackfin.uclinux.org
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/mach-bf561/smp.c6
-rw-r--r--arch/blackfin/mach-common/ints-priority.c9
2 files changed, 6 insertions, 9 deletions
diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c
index 5d68bf613b0b..7b07740cf68c 100644
--- a/arch/blackfin/mach-bf561/smp.c
+++ b/arch/blackfin/mach-bf561/smp.c
@@ -154,13 +154,13 @@ void platform_clear_ipi(unsigned int cpu, int irq)
154void __cpuinit bfin_local_timer_setup(void) 154void __cpuinit bfin_local_timer_setup(void)
155{ 155{
156#if defined(CONFIG_TICKSOURCE_CORETMR) 156#if defined(CONFIG_TICKSOURCE_CORETMR)
157 struct irq_chip *chip = get_irq_chip(IRQ_CORETMR); 157 struct irq_data *data = irq_get_irq_data(IRQ_CORETMR);
158 struct irq_desc *desc = irq_to_desc(IRQ_CORETMR); 158 struct irq_chip *chip = irq_data_get_irq_chip(data);
159 159
160 bfin_coretmr_init(); 160 bfin_coretmr_init();
161 bfin_coretmr_clockevent_init(); 161 bfin_coretmr_clockevent_init();
162 162
163 chip->irq_unmask(&desc->irq_data); 163 chip->irq_unmask(data);
164#else 164#else
165 /* Power down the core timer, just to play safe. */ 165 /* Power down the core timer, just to play safe. */
166 bfin_write_TCNTL(0); 166 bfin_write_TCNTL(0);
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c
index 6cd52395a999..cbfc88e11c12 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -578,10 +578,9 @@ static void bfin_gpio_ack_irq(struct irq_data *d)
578static void bfin_gpio_mask_ack_irq(struct irq_data *d) 578static void bfin_gpio_mask_ack_irq(struct irq_data *d)
579{ 579{
580 unsigned int irq = d->irq; 580 unsigned int irq = d->irq;
581 struct irq_desc *desc = irq_to_desc(irq);
582 u32 gpionr = irq_to_gpio(irq); 581 u32 gpionr = irq_to_gpio(irq);
583 582
584 if (desc->handle_irq == handle_edge_irq) 583 if (!irqd_is_level_type(d))
585 set_gpio_data(gpionr, 0); 584 set_gpio_data(gpionr, 0);
586 585
587 set_gpio_maska(gpionr, 0); 586 set_gpio_maska(gpionr, 0);
@@ -837,12 +836,11 @@ void init_pint_lut(void)
837 836
838static void bfin_gpio_ack_irq(struct irq_data *d) 837static void bfin_gpio_ack_irq(struct irq_data *d)
839{ 838{
840 struct irq_desc *desc = irq_to_desc(d->irq);
841 u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS]; 839 u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
842 u32 pintbit = PINT_BIT(pint_val); 840 u32 pintbit = PINT_BIT(pint_val);
843 u32 bank = PINT_2_BANK(pint_val); 841 u32 bank = PINT_2_BANK(pint_val);
844 842
845 if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { 843 if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
846 if (pint[bank]->invert_set & pintbit) 844 if (pint[bank]->invert_set & pintbit)
847 pint[bank]->invert_clear = pintbit; 845 pint[bank]->invert_clear = pintbit;
848 else 846 else
@@ -854,12 +852,11 @@ static void bfin_gpio_ack_irq(struct irq_data *d)
854 852
855static void bfin_gpio_mask_ack_irq(struct irq_data *d) 853static void bfin_gpio_mask_ack_irq(struct irq_data *d)
856{ 854{
857 struct irq_desc *desc = irq_to_desc(d->irq);
858 u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS]; 855 u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
859 u32 pintbit = PINT_BIT(pint_val); 856 u32 pintbit = PINT_BIT(pint_val);
860 u32 bank = PINT_2_BANK(pint_val); 857 u32 bank = PINT_2_BANK(pint_val);
861 858
862 if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { 859 if (irqd_get_trigger_type(d) == IRQ_TYPE_EDGE_BOTH) {
863 if (pint[bank]->invert_set & pintbit) 860 if (pint[bank]->invert_set & pintbit)
864 pint[bank]->invert_clear = pintbit; 861 pint[bank]->invert_clear = pintbit;
865 else 862 else