Commit 5561c9e4 authored by Andrew Bresticker's avatar Andrew Bresticker Committed by Ralf Baechle

irqchip: mips-gic: Remove platform irq_ack/irq_eoi callbacks

There's no need for platforms to have their own GIC irq_ack/irq_eoi
callbacks.  irq_ack need only clear the GIC's edge detector on
edge-triggered interrupts and there's no need at all for irq_eoi.
Also get rid of the mask_ack callback since it's not necessary either.
Signed-off-by: default avatarAndrew Bresticker <abrestic@chromium.org>
Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
Reviewed-by: default avatarQais Yousef <qais.yousef@imgtec.com>
Tested-by: default avatarQais Yousef <qais.yousef@imgtec.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Jonas Gorski <jogo@openwrt.org>
Cc: John Crispin <blogic@openwrt.org>
Cc: David Daney <ddaney.cavm@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7809/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 8a19b8f1
...@@ -376,7 +376,5 @@ extern void gic_bind_eic_interrupt(int irq, int set); ...@@ -376,7 +376,5 @@ extern void gic_bind_eic_interrupt(int irq, int set);
extern unsigned int gic_get_timer_pending(void); extern unsigned int gic_get_timer_pending(void);
extern void gic_get_int_mask(unsigned long *dst, const unsigned long *src); extern void gic_get_int_mask(unsigned long *dst, const unsigned long *src);
extern unsigned int gic_get_int(void); extern unsigned int gic_get_int(void);
extern void gic_irq_ack(struct irq_data *d);
extern void gic_finish_irq(struct irq_data *d);
extern void gic_platform_init(int irqs, struct irq_chip *irq_controller); extern void gic_platform_init(int irqs, struct irq_chip *irq_controller);
#endif /* _ASM_GICREGS_H */ #endif /* _ASM_GICREGS_H */
...@@ -715,22 +715,6 @@ int malta_be_handler(struct pt_regs *regs, int is_fixup) ...@@ -715,22 +715,6 @@ int malta_be_handler(struct pt_regs *regs, int is_fixup)
return retval; return retval;
} }
void gic_irq_ack(struct irq_data *d)
{
int irq = (d->irq - gic_irq_base);
GIC_CLR_INTR_MASK(irq);
if (gic_irq_flags[irq] & GIC_TRIG_EDGE)
GICWRITE(GIC_REG(SHARED, GIC_SH_WEDGE), irq);
}
void gic_finish_irq(struct irq_data *d)
{
/* Enable interrupts. */
GIC_SET_INTR_MASK(d->irq - gic_irq_base);
}
void __init gic_platform_init(int irqs, struct irq_chip *irq_controller) void __init gic_platform_init(int irqs, struct irq_chip *irq_controller)
{ {
int i; int i;
......
...@@ -85,27 +85,6 @@ void __init arch_init_irq(void) ...@@ -85,27 +85,6 @@ void __init arch_init_irq(void)
ARRAY_SIZE(gic_intr_map), MIPS_GIC_IRQ_BASE); ARRAY_SIZE(gic_intr_map), MIPS_GIC_IRQ_BASE);
} }
void gic_irq_ack(struct irq_data *d)
{
GIC_CLR_INTR_MASK(d->irq - gic_irq_base);
}
void gic_finish_irq(struct irq_data *d)
{
unsigned int irq = (d->irq - gic_irq_base);
unsigned int i, irq_source;
/* Clear edge detectors. */
for (i = 0; i < gic_shared_intr_map[irq].num_shared_intr; i++) {
irq_source = gic_shared_intr_map[irq].intr_list[i];
if (gic_irq_flags[irq_source] & GIC_TRIG_EDGE)
GICWRITE(GIC_REG(SHARED, GIC_SH_WEDGE), irq_source);
}
/* Enable interrupts. */
GIC_SET_INTR_MASK(irq);
}
void __init gic_platform_init(int irqs, struct irq_chip *irq_controller) void __init gic_platform_init(int irqs, struct irq_chip *irq_controller)
{ {
int i; int i;
......
...@@ -237,6 +237,13 @@ static void gic_unmask_irq(struct irq_data *d) ...@@ -237,6 +237,13 @@ static void gic_unmask_irq(struct irq_data *d)
GIC_SET_INTR_MASK(d->irq - gic_irq_base); GIC_SET_INTR_MASK(d->irq - gic_irq_base);
} }
static void gic_ack_irq(struct irq_data *d)
{
/* 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);
}
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
static DEFINE_SPINLOCK(gic_lock); static DEFINE_SPINLOCK(gic_lock);
...@@ -272,11 +279,9 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask, ...@@ -272,11 +279,9 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
static struct irq_chip gic_irq_controller = { static struct irq_chip gic_irq_controller = {
.name = "MIPS GIC", .name = "MIPS GIC",
.irq_ack = gic_irq_ack, .irq_ack = gic_ack_irq,
.irq_mask = gic_mask_irq, .irq_mask = gic_mask_irq,
.irq_mask_ack = gic_mask_irq,
.irq_unmask = gic_unmask_irq, .irq_unmask = gic_unmask_irq,
.irq_eoi = gic_finish_irq,
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
.irq_set_affinity = gic_set_affinity, .irq_set_affinity = gic_set_affinity,
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment