diff options
author | Paul Burton <paul.burton@imgtec.com> | 2017-08-12 21:36:21 -0700 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-09-04 13:53:14 +0200 |
commit | c26ba670cdb84e0556436be7bf68a75a1d4f4d76 (patch) | |
tree | 0300f2f1c12de09fbf8dd2654750355ddafedcad /drivers/irqchip/irq-mips-gic.c | |
parent | 471aa962a6acc19a990e20fa3846db40e62120cc (diff) | |
download | linux-c26ba670cdb84e0556436be7bf68a75a1d4f4d76.tar.bz2 |
irqchip: mips-gic: Remove gic_set_dual_edge()
Remove the gic_set_dual_edge() function in favour of using the new
change_gic_dual() accessor function which provides equivalent
functionality. This also allows us to remove the gic_update_bits()
function which gic_set_dual_edge() was the last user of, along with the
GIC_INTR_OFS() & GIC_INTR_BIT() macros.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/17031/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'drivers/irqchip/irq-mips-gic.c')
-rw-r--r-- | drivers/irqchip/irq-mips-gic.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c index 14a1682f399e..8aae9d20b82c 100644 --- a/drivers/irqchip/irq-mips-gic.c +++ b/drivers/irqchip/irq-mips-gic.c @@ -81,24 +81,6 @@ static inline void gic_write(unsigned int reg, unsigned long val) return gic_write64(reg, (u64)val); } -static inline void gic_update_bits(unsigned int reg, unsigned long mask, - unsigned long val) -{ - unsigned long regval; - - regval = gic_read(reg); - regval &= ~mask; - regval |= val; - gic_write(reg, regval); -} - -static inline void gic_set_dual_edge(unsigned int intr, unsigned int dual) -{ - gic_update_bits(GIC_REG(SHARED, GIC_SH_SET_DUAL) + GIC_INTR_OFS(intr), - 1ul << GIC_INTR_BIT(intr), - (unsigned long)dual << GIC_INTR_BIT(intr)); -} - static inline void gic_map_to_pin(unsigned int intr, unsigned int pin) { gic_write32(GIC_REG(SHARED, GIC_SH_INTR_MAP_TO_PIN_BASE) + @@ -260,32 +242,32 @@ static int gic_set_type(struct irq_data *d, unsigned int type) case IRQ_TYPE_EDGE_FALLING: change_gic_pol(irq, GIC_POL_FALLING_EDGE); change_gic_trig(irq, GIC_TRIG_EDGE); - gic_set_dual_edge(irq, GIC_TRIG_DUAL_DISABLE); + change_gic_dual(irq, GIC_DUAL_SINGLE); is_edge = true; break; case IRQ_TYPE_EDGE_RISING: change_gic_pol(irq, GIC_POL_RISING_EDGE); change_gic_trig(irq, GIC_TRIG_EDGE); - gic_set_dual_edge(irq, GIC_TRIG_DUAL_DISABLE); + change_gic_dual(irq, GIC_DUAL_SINGLE); is_edge = true; break; case IRQ_TYPE_EDGE_BOTH: /* polarity is irrelevant in this case */ change_gic_trig(irq, GIC_TRIG_EDGE); - gic_set_dual_edge(irq, GIC_TRIG_DUAL_ENABLE); + change_gic_dual(irq, GIC_DUAL_DUAL); is_edge = true; break; case IRQ_TYPE_LEVEL_LOW: change_gic_pol(irq, GIC_POL_ACTIVE_LOW); change_gic_trig(irq, GIC_TRIG_LEVEL); - gic_set_dual_edge(irq, GIC_TRIG_DUAL_DISABLE); + change_gic_dual(irq, GIC_DUAL_SINGLE); is_edge = false; break; case IRQ_TYPE_LEVEL_HIGH: default: change_gic_pol(irq, GIC_POL_ACTIVE_HIGH); change_gic_trig(irq, GIC_TRIG_LEVEL); - gic_set_dual_edge(irq, GIC_TRIG_DUAL_DISABLE); + change_gic_dual(irq, GIC_DUAL_SINGLE); is_edge = false; break; } |