Thread (28 messages) 28 messages, 4 authors, 2014-09-22
STALE4314d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 08/16] irqchip: mips-gic: Implement generic irq_ack/irq_eoi callbacks

From: Andrew Bresticker <hidden>
Date: 2014-09-05 17:32:59
Also in: linux-mips, lkml
Subsystem: irqchip drivers, mips core drivers, the rest · Maintainers: Thomas Gleixner, Thomas Bogendoerfer, Linus Torvalds

Implement a default gic_irq_ack() and gic_finish_irq().  These are
suitable for handling IPIs on Malta and the upcoming Danube board.

Signed-off-by: Andrew Bresticker <redacted>
---
No changes from v1.
---
 drivers/irqchip/irq-mips-gic.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index f29bb4e..0549768 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -239,6 +239,20 @@ static void gic_unmask_irq(struct irq_data *d)
 	GIC_SET_INTR_MASK(d->irq - gic_irq_base);
 }
 
+void __weak gic_irq_ack(struct irq_data *d)
+{
+	GIC_CLR_INTR_MASK(d->irq - gic_irq_base);
+
+	/* Clear edge detector */
+	if (gic_irq_flags[d->irq - gic_irq_base] & GIC_TRIG_EDGE)
+		GICWRITE(GIC_REG(SHARED, GIC_SH_WEDGE), d->irq - gic_irq_base);
+}
+
+void __weak gic_finish_irq(struct irq_data *d)
+{
+	GIC_SET_INTR_MASK(d->irq - gic_irq_base);
+}
+
 static int gic_set_type(struct irq_data *d, unsigned int type)
 {
 	unsigned int irq = d->irq - gic_irq_base;
-- 
2.1.0.rc2.206.gedb03e5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help