diff options
Diffstat (limited to 'drivers/irqchip/irq-armada-370-xp.c')
-rw-r--r-- | drivers/irqchip/irq-armada-370-xp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 1115bf878ca0..ad1e6422a732 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c | |||
@@ -48,7 +48,9 @@ | |||
48 | 48 | ||
49 | #define ARMADA_370_XP_TIMER0_PER_CPU_IRQ (5) | 49 | #define ARMADA_370_XP_TIMER0_PER_CPU_IRQ (5) |
50 | 50 | ||
51 | #define ACTIVE_DOORBELLS (8) | 51 | #define IPI_DOORBELL_START (0) |
52 | #define IPI_DOORBELL_END (8) | ||
53 | #define IPI_DOORBELL_MASK 0xFF | ||
52 | 54 | ||
53 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); | 55 | static DEFINE_RAW_SPINLOCK(irq_controller_lock); |
54 | 56 | ||
@@ -192,7 +194,7 @@ void armada_xp_mpic_smp_cpu_init(void) | |||
192 | writel(0, per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS); | 194 | writel(0, per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS); |
193 | 195 | ||
194 | /* Enable first 8 IPIs */ | 196 | /* Enable first 8 IPIs */ |
195 | writel((1 << ACTIVE_DOORBELLS) - 1, per_cpu_int_base + | 197 | writel(IPI_DOORBELL_MASK, per_cpu_int_base + |
196 | ARMADA_370_XP_IN_DRBEL_MSK_OFFS); | 198 | ARMADA_370_XP_IN_DRBEL_MSK_OFFS); |
197 | 199 | ||
198 | /* Unmask IPI interrupt */ | 200 | /* Unmask IPI interrupt */ |
@@ -231,13 +233,14 @@ armada_370_xp_handle_irq(struct pt_regs *regs) | |||
231 | 233 | ||
232 | ipimask = readl_relaxed(per_cpu_int_base + | 234 | ipimask = readl_relaxed(per_cpu_int_base + |
233 | ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS) | 235 | ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS) |
234 | & 0xFF; | 236 | & IPI_DOORBELL_MASK; |
235 | 237 | ||
236 | writel(0x0, per_cpu_int_base + | 238 | writel(~IPI_DOORBELL_MASK, per_cpu_int_base + |
237 | ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS); | 239 | ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS); |
238 | 240 | ||
239 | /* Handle all pending doorbells */ | 241 | /* Handle all pending doorbells */ |
240 | for (ipinr = 0; ipinr < ACTIVE_DOORBELLS; ipinr++) { | 242 | for (ipinr = IPI_DOORBELL_START; |
243 | ipinr < IPI_DOORBELL_END; ipinr++) { | ||
241 | if (ipimask & (0x1 << ipinr)) | 244 | if (ipimask & (0x1 << ipinr)) |
242 | handle_IPI(ipinr, regs); | 245 | handle_IPI(ipinr, regs); |
243 | } | 246 | } |