]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: OMAP4+: Correct Wakeup-gen code to use physical irq number
authorSricharan R <r.sricharan@ti.com>
Tue, 3 Dec 2013 10:27:24 +0000 (15:57 +0530)
committerSricharan R <r.sricharan@ti.com>
Wed, 5 Feb 2014 14:38:34 +0000 (20:08 +0530)
The wakeup gen mask/unmask callback uses the irq element of the
irq_data to setup. The irq is the linux virtual irq number and
is same as the hardware irq number only when the parent irqchip
is setup as a legacy domain. When it is used as a linear domain,
the virtual irqs are allocated dynamically and wakeup gen code
cannot rely on these numbers to access the irq registers. Instead
use the hwirq element of the irq_data which represent the physical
irq number.

Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sricharan R <r.sricharan@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-omap2/omap-wakeupgen.c

index 3664562f91481e76487ff77ef8e133ccd7edfaab..693fe486e9172d987879655efc799b531d01bd34 100644 (file)
@@ -138,7 +138,7 @@ static void wakeupgen_mask(struct irq_data *d)
        unsigned long flags;
 
        raw_spin_lock_irqsave(&wakeupgen_lock, flags);
-       _wakeupgen_clear(d->irq, irq_target_cpu[d->irq]);
+       _wakeupgen_clear(d->hwirq, irq_target_cpu[d->hwirq]);
        raw_spin_unlock_irqrestore(&wakeupgen_lock, flags);
 }
 
@@ -150,7 +150,7 @@ static void wakeupgen_unmask(struct irq_data *d)
        unsigned long flags;
 
        raw_spin_lock_irqsave(&wakeupgen_lock, flags);
-       _wakeupgen_set(d->irq, irq_target_cpu[d->irq]);
+       _wakeupgen_set(d->hwirq, irq_target_cpu[d->hwirq]);
        raw_spin_unlock_irqrestore(&wakeupgen_lock, flags);
 }