summaryrefslogtreecommitdiff
path: root/include/soc/arc/mcip.h
diff options
context:
space:
mode:
authorMischa Jonker <Mischa.Jonker@synopsys.com>2019-07-24 15:04:34 +0300
committerVineet Gupta <vgupta@synopsys.com>2019-08-26 20:04:59 +0300
commit174ae4e96e0f54958cbe3fd3090a3cefeb63af4d (patch)
treef88520e09b92c603be965720d4df1a31da554e8b /include/soc/arc/mcip.h
parente86d94fdda8e11a2acbe0a910e82f7519f6088b7 (diff)
downloadlinux-174ae4e96e0f54958cbe3fd3090a3cefeb63af4d.tar.xz
ARCv2: IDU-intc: Add support for edge-triggered interrupts
This adds support for an optional extra interrupt cell to specify edge vs level triggered. It is backward compatible with dts files with only one cell, and will default to level-triggered in such a case. Note that I had to make a change to idu_irq_set_affinity as well, as this function was setting the interrupt type to "level" unconditionally, since this was the only type supported previously. Signed-off-by: Mischa Jonker <mischa.jonker@synopsys.com> Reviewed-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'include/soc/arc/mcip.h')
-rw-r--r--include/soc/arc/mcip.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/soc/arc/mcip.h b/include/soc/arc/mcip.h
index 50f49e043668..d1a93c73f006 100644
--- a/include/soc/arc/mcip.h
+++ b/include/soc/arc/mcip.h
@@ -46,7 +46,9 @@ struct mcip_cmd {
#define CMD_IDU_ENABLE 0x71
#define CMD_IDU_DISABLE 0x72
#define CMD_IDU_SET_MODE 0x74
+#define CMD_IDU_READ_MODE 0x75
#define CMD_IDU_SET_DEST 0x76
+#define CMD_IDU_ACK_CIRQ 0x79
#define CMD_IDU_SET_MASK 0x7C
#define IDU_M_TRIG_LEVEL 0x0
@@ -119,4 +121,13 @@ static inline void __mcip_cmd_data(unsigned int cmd, unsigned int param,
__mcip_cmd(cmd, param);
}
+/*
+ * Read MCIP register
+ */
+static inline unsigned int __mcip_cmd_read(unsigned int cmd, unsigned int param)
+{
+ __mcip_cmd(cmd, param);
+ return read_aux_reg(ARC_REG_MCIP_READBACK);
+}
+
#endif