aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/irqchip/irq-sun4i.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/irqchip/irq-sun4i.c b/drivers/irqchip/irq-sun4i.c
index 003a146a1750..6fcef4a95a18 100644
--- a/drivers/irqchip/irq-sun4i.c
+++ b/drivers/irqchip/irq-sun4i.c
@@ -41,16 +41,11 @@ static void __exception_irq_entry sun4i_handle_irq(struct pt_regs *regs);
41static void sun4i_irq_ack(struct irq_data *irqd) 41static void sun4i_irq_ack(struct irq_data *irqd)
42{ 42{
43 unsigned int irq = irqd_to_hwirq(irqd); 43 unsigned int irq = irqd_to_hwirq(irqd);
44 unsigned int irq_off = irq % 32;
45 int reg = irq / 32;
46 u32 val;
47 44
48 if (irq != 0) 45 if (irq != 0)
49 return; /* Only IRQ 0 / the ENMI needs to be acked */ 46 return; /* Only IRQ 0 / the ENMI needs to be acked */
50 47
51 val = readl(sun4i_irq_base + SUN4I_IRQ_PENDING_REG(reg)); 48 writel(BIT(0), sun4i_irq_base + SUN4I_IRQ_PENDING_REG(0));
52 writel(val | (1 << irq_off),
53 sun4i_irq_base + SUN4I_IRQ_PENDING_REG(reg));
54} 49}
55 50
56static void sun4i_irq_mask(struct irq_data *irqd) 51static void sun4i_irq_mask(struct irq_data *irqd)