summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuriy Kolerov <yuriy.kolerov@synopsys.com>2017-02-01 20:00:30 +0100
committerVineet Gupta <vgupta@synopsys.com>2017-02-06 18:37:57 +0100
commitfc73965ed0aa360d1c1813fcdb078533cbab03e3 (patch)
tree82e901c9352be28e26622c8b355b5b1911abf884
parentARCv2: IDU-intc: Use build registers for getting numbers of interrupts (diff)
downloadlinux-fc73965ed0aa360d1c1813fcdb078533cbab03e3.tar.xz
linux-fc73965ed0aa360d1c1813fcdb078533cbab03e3.zip
ARCv2: IDU-intc: mask all common interrupts by default
Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> [vgupta: broken off from a bigger patch]
-rw-r--r--arch/arc/kernel/mcip.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arc/kernel/mcip.c b/arch/arc/kernel/mcip.c
index 21dc89704113..b91d833ea6bb 100644
--- a/arch/arc/kernel/mcip.c
+++ b/arch/arc/kernel/mcip.c
@@ -156,15 +156,20 @@ static void idu_set_mode(unsigned int cmn_irq, unsigned int lvl,
__mcip_cmd_data(CMD_IDU_SET_MODE, cmn_irq, data.word);
}
-static void idu_irq_mask(struct irq_data *data)
+static void idu_irq_mask_raw(irq_hw_number_t hwirq)
{
unsigned long flags;
raw_spin_lock_irqsave(&mcip_lock, flags);
- __mcip_cmd_data(CMD_IDU_SET_MASK, data->hwirq, 1);
+ __mcip_cmd_data(CMD_IDU_SET_MASK, hwirq, 1);
raw_spin_unlock_irqrestore(&mcip_lock, flags);
}
+static void idu_irq_mask(struct irq_data *data)
+{
+ idu_irq_mask_raw(data->hwirq);
+}
+
static void idu_irq_unmask(struct irq_data *data)
{
unsigned long flags;
@@ -301,6 +306,9 @@ idu_of_init(struct device_node *intc, struct device_node *parent)
/* Parent interrupts (core-intc) are already mapped */
for (i = 0; i < nr_irqs; i++) {
+ /* Mask all common interrupts by default */
+ idu_irq_mask_raw(i);
+
/*
* Return parent uplink IRQs (towards core intc) 24,25,.....
* this step has been done before already