diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2015-05-28 14:27:30 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2015-08-05 09:30:58 +0200 |
commit | 5880c57ce5dccda7c3b370e44214b6f2ea44e982 (patch) | |
tree | ba1d1fa2fac09861c33e299f4eacba230cd3b205 /drivers/irqchip | |
parent | f7e9e5e9d39dc4c445a3bb16a95d55b865e6ea3b (diff) |
irqchip: vf610-mscm-ir: allow to enable/disable CPU2CPU interrupts
Extend the CPU2CPU interrupt API with enable/disable which allow to
enable and disable the interrupts using the CPU2CPU IRQ numbers 0-3.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r-- | drivers/irqchip/irq-vf610-mscm-ir.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-vf610-mscm-ir.c b/drivers/irqchip/irq-vf610-mscm-ir.c index 25c3b1337950..cb69a5901bc6 100644 --- a/drivers/irqchip/irq-vf610-mscm-ir.c +++ b/drivers/irqchip/irq-vf610-mscm-ir.c @@ -243,6 +243,27 @@ void mscm_trigger_cpu2cpu_irq(unsigned int intid, int cpuid) } EXPORT_SYMBOL(mscm_trigger_cpu2cpu_irq); +void mscm_enable_cpu2cpu_irq(unsigned int intid) +{ + struct mscm_cpu2cpu_irq_data *data = &cpu2cpu_irq_data[intid]; + + if (intid >= MSCM_CPU2CPU_NUM) + return; + + enable_irq(data->irq); +} +EXPORT_SYMBOL(mscm_enable_cpu2cpu_irq); + +void mscm_disable_cpu2cpu_irq(unsigned int intid) +{ + struct mscm_cpu2cpu_irq_data *data = &cpu2cpu_irq_data[intid]; + + if (intid >= MSCM_CPU2CPU_NUM) + return; + + disable_irq(data->irq); +} +EXPORT_SYMBOL(mscm_disable_cpu2cpu_irq); static int __init vf610_mscm_ir_of_init(struct device_node *node, struct device_node *parent) |