diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2012-09-28 16:29:55 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-09-28 16:29:55 +0200 |
commit | cb418b34caddc970c1513e515aaa535246a4bba3 (patch) | |
tree | b89720b74d6a85a9407f03bb064248c7235b9dea /arch/mips/mti-malta | |
parent | 77a0d763c461da81c2a3fc9a7e58162a40854a1a (diff) | |
parent | ff401e52100dcdc85e572d1ad376d3307b3fe28e (diff) | |
download | linux-cb418b34caddc970c1513e515aaa535246a4bba3.tar.bz2 |
Merge branch 'ralf-3.7' of git://git.linux-mips.org/pub/scm/sjhill/linux-sjhill into mips-for-linux-next
Diffstat (limited to 'arch/mips/mti-malta')
-rw-r--r-- | arch/mips/mti-malta/malta-int.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/mips/mti-malta/malta-int.c b/arch/mips/mti-malta/malta-int.c index fea823f18479..647b86383184 100644 --- a/arch/mips/mti-malta/malta-int.c +++ b/arch/mips/mti-malta/malta-int.c @@ -750,3 +750,37 @@ int malta_be_handler(struct pt_regs *regs, int is_fixup) return retval; } + +void gic_enable_interrupt(int irq_vec) +{ + GIC_SET_INTR_MASK(irq_vec); +} + +void gic_disable_interrupt(int irq_vec) +{ + GIC_CLR_INTR_MASK(irq_vec); +} + +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) +{ + int i; + + for (i = gic_irq_base; i < (gic_irq_base + irqs); i++) + irq_set_chip(i, irq_controller); +} |