summaryrefslogtreecommitdiff
path: root/drivers/net/ipa/gsi_reg.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2020-11-05 21:13:58 +0300
committerJakub Kicinski <kuba@kernel.org>2020-11-08 02:39:16 +0300
commitf9b28804ab50eb951c50f4c5afec77ab0435309a (patch)
tree295c3e6af169defb43580af967c964b7b82d1904 /drivers/net/ipa/gsi_reg.h
parenta054539db1966908d3730f29ef3726534cd1f2d5 (diff)
downloadlinux-f9b28804ab50eb951c50f4c5afec77ab0435309a.tar.xz
net: ipa: define GSI interrupt types with an enum
Define the GSI interrupt types with an enumerated type whose values are the bit positions representing each interrupt type. Include a short comment describing how each interrupt type is used. Build up the enabled interrupt mask explicitly in gsi_irq_enable(), and get rid of the definition of GSI_CNTXT_TYPE_IRQ_MSK_ALL. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ipa/gsi_reg.h')
-rw-r--r--drivers/net/ipa/gsi_reg.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/ipa/gsi_reg.h b/drivers/net/ipa/gsi_reg.h
index 9668797aa58e..1dd81cf0b46a 100644
--- a/drivers/net/ipa/gsi_reg.h
+++ b/drivers/net/ipa/gsi_reg.h
@@ -262,15 +262,16 @@
GSI_EE_N_CNTXT_TYPE_IRQ_MSK_OFFSET(GSI_EE_AP)
#define GSI_EE_N_CNTXT_TYPE_IRQ_MSK_OFFSET(ee) \
(0x0001f088 + 0x4000 * (ee))
-/* The masks below are used for the TYPE_IRQ and TYPE_IRQ_MASK registers */
-#define CH_CTRL_FMASK GENMASK(0, 0)
-#define EV_CTRL_FMASK GENMASK(1, 1)
-#define GLOB_EE_FMASK GENMASK(2, 2)
-#define IEOB_FMASK GENMASK(3, 3)
-#define INTER_EE_CH_CTRL_FMASK GENMASK(4, 4)
-#define INTER_EE_EV_CTRL_FMASK GENMASK(5, 5)
-#define GENERAL_FMASK GENMASK(6, 6)
-#define GSI_CNTXT_TYPE_IRQ_MSK_ALL GENMASK(6, 0)
+/* Values here are bit positions in the TYPE_IRQ and TYPE_IRQ_MSK registers */
+enum gsi_irq_type_id {
+ GSI_CH_CTRL = 0, /* channel allocation, etc. */
+ GSI_EV_CTRL = 1, /* event ring allocation, etc. */
+ GSI_GLOB_EE = 2, /* global/general event */
+ GSI_IEOB = 3, /* TRE completion */
+ GSI_INTER_EE_CH_CTRL = 4, /* remote-issued stop/reset (unused) */
+ GSI_INTER_EE_EV_CTRL = 5, /* remote-issued event reset (unused) */
+ GSI_GENERAL = 6, /* general-purpose event */
+};
#define GSI_CNTXT_SRC_CH_IRQ_OFFSET \
GSI_EE_N_CNTXT_SRC_CH_IRQ_OFFSET(GSI_EE_AP)