162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci/* Copyright (C) 2023 Linaro Ltd. */
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <linux/types.h>
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#include "../gsi.h"
862306a36Sopenharmony_ci#include "../reg.h"
962306a36Sopenharmony_ci#include "../gsi_reg.h"
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciREG(INTER_EE_SRC_CH_IRQ_MSK, inter_ee_src_ch_irq_msk,
1262306a36Sopenharmony_ci    0x0000c020 + 0x1000 * GSI_EE_AP);
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ciREG(INTER_EE_SRC_EV_CH_IRQ_MSK, inter_ee_src_ev_ch_irq_msk,
1562306a36Sopenharmony_ci    0x0000c024 + 0x1000 * GSI_EE_AP);
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_cistatic const u32 reg_ch_c_cntxt_0_fmask[] = {
1862306a36Sopenharmony_ci	[CHTYPE_PROTOCOL]				= GENMASK(2, 0),
1962306a36Sopenharmony_ci	[CHTYPE_DIR]					= BIT(3),
2062306a36Sopenharmony_ci	[CH_EE]						= GENMASK(7, 4),
2162306a36Sopenharmony_ci	[CHID]						= GENMASK(12, 8),
2262306a36Sopenharmony_ci	[CHTYPE_PROTOCOL_MSB]				= BIT(13),
2362306a36Sopenharmony_ci	[ERINDEX]					= GENMASK(18, 14),
2462306a36Sopenharmony_ci						/* Bit 19 reserved */
2562306a36Sopenharmony_ci	[CHSTATE]					= GENMASK(23, 20),
2662306a36Sopenharmony_ci	[ELEMENT_SIZE]					= GENMASK(31, 24),
2762306a36Sopenharmony_ci};
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ciREG_STRIDE_FIELDS(CH_C_CNTXT_0, ch_c_cntxt_0,
3062306a36Sopenharmony_ci		  0x0000f000 + 0x4000 * GSI_EE_AP, 0x80);
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_cistatic const u32 reg_ch_c_cntxt_1_fmask[] = {
3362306a36Sopenharmony_ci	[CH_R_LENGTH]					= GENMASK(19, 0),
3462306a36Sopenharmony_ci						/* Bits 20-31 reserved */
3562306a36Sopenharmony_ci};
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ciREG_STRIDE_FIELDS(CH_C_CNTXT_1, ch_c_cntxt_1,
3862306a36Sopenharmony_ci		  0x0000f004 + 0x4000 * GSI_EE_AP, 0x80);
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ciREG_STRIDE(CH_C_CNTXT_2, ch_c_cntxt_2, 0x0000f008 + 0x4000 * GSI_EE_AP, 0x80);
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciREG_STRIDE(CH_C_CNTXT_3, ch_c_cntxt_3, 0x0000f00c + 0x4000 * GSI_EE_AP, 0x80);
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_cistatic const u32 reg_ch_c_qos_fmask[] = {
4562306a36Sopenharmony_ci	[WRR_WEIGHT]					= GENMASK(3, 0),
4662306a36Sopenharmony_ci						/* Bits 4-7 reserved */
4762306a36Sopenharmony_ci	[MAX_PREFETCH]					= BIT(8),
4862306a36Sopenharmony_ci	[USE_DB_ENG]					= BIT(9),
4962306a36Sopenharmony_ci	[PREFETCH_MODE]					= GENMASK(13, 10),
5062306a36Sopenharmony_ci						/* Bits 14-15 reserved */
5162306a36Sopenharmony_ci	[EMPTY_LVL_THRSHOLD]				= GENMASK(23, 16),
5262306a36Sopenharmony_ci	[DB_IN_BYTES]					= BIT(24),
5362306a36Sopenharmony_ci						/* Bits 25-31 reserved */
5462306a36Sopenharmony_ci};
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ciREG_STRIDE_FIELDS(CH_C_QOS, ch_c_qos, 0x0000f05c + 0x4000 * GSI_EE_AP, 0x80);
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_cistatic const u32 reg_error_log_fmask[] = {
5962306a36Sopenharmony_ci	[ERR_ARG3]					= GENMASK(3, 0),
6062306a36Sopenharmony_ci	[ERR_ARG2]					= GENMASK(7, 4),
6162306a36Sopenharmony_ci	[ERR_ARG1]					= GENMASK(11, 8),
6262306a36Sopenharmony_ci	[ERR_CODE]					= GENMASK(15, 12),
6362306a36Sopenharmony_ci						/* Bits 16-18 reserved */
6462306a36Sopenharmony_ci	[ERR_VIRT_IDX]					= GENMASK(23, 19),
6562306a36Sopenharmony_ci	[ERR_TYPE]					= GENMASK(27, 24),
6662306a36Sopenharmony_ci	[ERR_EE]					= GENMASK(31, 28),
6762306a36Sopenharmony_ci};
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ciREG_STRIDE(CH_C_SCRATCH_0, ch_c_scratch_0,
7062306a36Sopenharmony_ci	   0x0000f060 + 0x4000 * GSI_EE_AP, 0x80);
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ciREG_STRIDE(CH_C_SCRATCH_1, ch_c_scratch_1,
7362306a36Sopenharmony_ci	   0x0000f064 + 0x4000 * GSI_EE_AP, 0x80);
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ciREG_STRIDE(CH_C_SCRATCH_2, ch_c_scratch_2,
7662306a36Sopenharmony_ci	   0x0000f068 + 0x4000 * GSI_EE_AP, 0x80);
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ciREG_STRIDE(CH_C_SCRATCH_3, ch_c_scratch_3,
7962306a36Sopenharmony_ci	   0x0000f06c + 0x4000 * GSI_EE_AP, 0x80);
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_cistatic const u32 reg_ev_ch_e_cntxt_0_fmask[] = {
8262306a36Sopenharmony_ci	[EV_CHTYPE]					= GENMASK(3, 0),
8362306a36Sopenharmony_ci	[EV_EE]						= GENMASK(7, 4),
8462306a36Sopenharmony_ci	[EV_EVCHID]					= GENMASK(15, 8),
8562306a36Sopenharmony_ci	[EV_INTYPE]					= BIT(16),
8662306a36Sopenharmony_ci						/* Bits 17-19 reserved */
8762306a36Sopenharmony_ci	[EV_CHSTATE]					= GENMASK(23, 20),
8862306a36Sopenharmony_ci	[EV_ELEMENT_SIZE]				= GENMASK(31, 24),
8962306a36Sopenharmony_ci};
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ciREG_STRIDE_FIELDS(EV_CH_E_CNTXT_0, ev_ch_e_cntxt_0,
9262306a36Sopenharmony_ci		  0x00010000 + 0x4000 * GSI_EE_AP, 0x80);
9362306a36Sopenharmony_ci
9462306a36Sopenharmony_cistatic const u32 reg_ev_ch_e_cntxt_1_fmask[] = {
9562306a36Sopenharmony_ci	[R_LENGTH]					= GENMASK(19, 0),
9662306a36Sopenharmony_ci};
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ciREG_STRIDE_FIELDS(EV_CH_E_CNTXT_1, ev_ch_e_cntxt_1,
9962306a36Sopenharmony_ci		  0x00010004 + 0x4000 * GSI_EE_AP, 0x80);
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ciREG_STRIDE(EV_CH_E_CNTXT_2, ev_ch_e_cntxt_2,
10262306a36Sopenharmony_ci	   0x00010008 + 0x4000 * GSI_EE_AP, 0x80);
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ciREG_STRIDE(EV_CH_E_CNTXT_3, ev_ch_e_cntxt_3,
10562306a36Sopenharmony_ci	   0x0001000c + 0x4000 * GSI_EE_AP, 0x80);
10662306a36Sopenharmony_ci
10762306a36Sopenharmony_ciREG_STRIDE(EV_CH_E_CNTXT_4, ev_ch_e_cntxt_4,
10862306a36Sopenharmony_ci	   0x00010010 + 0x4000 * GSI_EE_AP, 0x80);
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_cistatic const u32 reg_ev_ch_e_cntxt_8_fmask[] = {
11162306a36Sopenharmony_ci	[EV_MODT]					= GENMASK(15, 0),
11262306a36Sopenharmony_ci	[EV_MODC]					= GENMASK(23, 16),
11362306a36Sopenharmony_ci	[EV_MOD_CNT]					= GENMASK(31, 24),
11462306a36Sopenharmony_ci};
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ciREG_STRIDE_FIELDS(EV_CH_E_CNTXT_8, ev_ch_e_cntxt_8,
11762306a36Sopenharmony_ci		  0x00010020 + 0x4000 * GSI_EE_AP, 0x80);
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ciREG_STRIDE(EV_CH_E_CNTXT_9, ev_ch_e_cntxt_9,
12062306a36Sopenharmony_ci	   0x00010024 + 0x4000 * GSI_EE_AP, 0x80);
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ciREG_STRIDE(EV_CH_E_CNTXT_10, ev_ch_e_cntxt_10,
12362306a36Sopenharmony_ci	   0x00010028 + 0x4000 * GSI_EE_AP, 0x80);
12462306a36Sopenharmony_ci
12562306a36Sopenharmony_ciREG_STRIDE(EV_CH_E_CNTXT_11, ev_ch_e_cntxt_11,
12662306a36Sopenharmony_ci	   0x0001002c + 0x4000 * GSI_EE_AP, 0x80);
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ciREG_STRIDE(EV_CH_E_CNTXT_12, ev_ch_e_cntxt_12,
12962306a36Sopenharmony_ci	   0x00010030 + 0x4000 * GSI_EE_AP, 0x80);
13062306a36Sopenharmony_ci
13162306a36Sopenharmony_ciREG_STRIDE(EV_CH_E_CNTXT_13, ev_ch_e_cntxt_13,
13262306a36Sopenharmony_ci	   0x00010034 + 0x4000 * GSI_EE_AP, 0x80);
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ciREG_STRIDE(EV_CH_E_SCRATCH_0, ev_ch_e_scratch_0,
13562306a36Sopenharmony_ci	   0x00010048 + 0x4000 * GSI_EE_AP, 0x80);
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_ciREG_STRIDE(EV_CH_E_SCRATCH_1, ev_ch_e_scratch_1,
13862306a36Sopenharmony_ci	   0x0001004c + 0x4000 * GSI_EE_AP, 0x80);
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ciREG_STRIDE(CH_C_DOORBELL_0, ch_c_doorbell_0,
14162306a36Sopenharmony_ci	   0x00011000 + 0x4000 * GSI_EE_AP, 0x08);
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ciREG_STRIDE(EV_CH_E_DOORBELL_0, ev_ch_e_doorbell_0,
14462306a36Sopenharmony_ci	   0x00011100 + 0x4000 * GSI_EE_AP, 0x08);
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_cistatic const u32 reg_gsi_status_fmask[] = {
14762306a36Sopenharmony_ci	[ENABLED]					= BIT(0),
14862306a36Sopenharmony_ci						/* Bits 1-31 reserved */
14962306a36Sopenharmony_ci};
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ciREG_FIELDS(GSI_STATUS, gsi_status, 0x00012000 + 0x4000 * GSI_EE_AP);
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_cistatic const u32 reg_ch_cmd_fmask[] = {
15462306a36Sopenharmony_ci	[CH_CHID]					= GENMASK(7, 0),
15562306a36Sopenharmony_ci						/* Bits 8-23 reserved */
15662306a36Sopenharmony_ci	[CH_OPCODE]					= GENMASK(31, 24),
15762306a36Sopenharmony_ci};
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ciREG_FIELDS(CH_CMD, ch_cmd, 0x00012008 + 0x4000 * GSI_EE_AP);
16062306a36Sopenharmony_ci
16162306a36Sopenharmony_cistatic const u32 reg_ev_ch_cmd_fmask[] = {
16262306a36Sopenharmony_ci	[EV_CHID]					= GENMASK(7, 0),
16362306a36Sopenharmony_ci						/* Bits 8-23 reserved */
16462306a36Sopenharmony_ci	[EV_OPCODE]					= GENMASK(31, 24),
16562306a36Sopenharmony_ci};
16662306a36Sopenharmony_ci
16762306a36Sopenharmony_ciREG_FIELDS(EV_CH_CMD, ev_ch_cmd, 0x00012010 + 0x4000 * GSI_EE_AP);
16862306a36Sopenharmony_ci
16962306a36Sopenharmony_cistatic const u32 reg_generic_cmd_fmask[] = {
17062306a36Sopenharmony_ci	[GENERIC_OPCODE]				= GENMASK(4, 0),
17162306a36Sopenharmony_ci	[GENERIC_CHID]					= GENMASK(9, 5),
17262306a36Sopenharmony_ci	[GENERIC_EE]					= GENMASK(13, 10),
17362306a36Sopenharmony_ci						/* Bits 14-23 reserved */
17462306a36Sopenharmony_ci	[GENERIC_PARAMS]				= GENMASK(31, 24),
17562306a36Sopenharmony_ci};
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ciREG_FIELDS(GENERIC_CMD, generic_cmd, 0x00012018 + 0x4000 * GSI_EE_AP);
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_cistatic const u32 reg_hw_param_2_fmask[] = {
18062306a36Sopenharmony_ci	[IRAM_SIZE]					= GENMASK(2, 0),
18162306a36Sopenharmony_ci	[NUM_CH_PER_EE]					= GENMASK(7, 3),
18262306a36Sopenharmony_ci	[NUM_EV_PER_EE]					= GENMASK(12, 8),
18362306a36Sopenharmony_ci	[GSI_CH_PEND_TRANSLATE]				= BIT(13),
18462306a36Sopenharmony_ci	[GSI_CH_FULL_LOGIC]				= BIT(14),
18562306a36Sopenharmony_ci	[GSI_USE_SDMA]					= BIT(15),
18662306a36Sopenharmony_ci	[GSI_SDMA_N_INT]				= GENMASK(18, 16),
18762306a36Sopenharmony_ci	[GSI_SDMA_MAX_BURST]				= GENMASK(26, 19),
18862306a36Sopenharmony_ci	[GSI_SDMA_N_IOVEC]				= GENMASK(29, 27),
18962306a36Sopenharmony_ci	[GSI_USE_RD_WR_ENG]				= BIT(30),
19062306a36Sopenharmony_ci	[GSI_USE_INTER_EE]				= BIT(31),
19162306a36Sopenharmony_ci};
19262306a36Sopenharmony_ci
19362306a36Sopenharmony_ciREG_FIELDS(HW_PARAM_2, hw_param_2, 0x00012040 + 0x4000 * GSI_EE_AP);
19462306a36Sopenharmony_ci
19562306a36Sopenharmony_ciREG(CNTXT_TYPE_IRQ, cntxt_type_irq, 0x00012080 + 0x4000 * GSI_EE_AP);
19662306a36Sopenharmony_ci
19762306a36Sopenharmony_ciREG(CNTXT_TYPE_IRQ_MSK, cntxt_type_irq_msk, 0x00012088 + 0x4000 * GSI_EE_AP);
19862306a36Sopenharmony_ci
19962306a36Sopenharmony_ciREG(CNTXT_SRC_CH_IRQ, cntxt_src_ch_irq, 0x00012090 + 0x4000 * GSI_EE_AP);
20062306a36Sopenharmony_ci
20162306a36Sopenharmony_ciREG(CNTXT_SRC_EV_CH_IRQ, cntxt_src_ev_ch_irq, 0x00012094 + 0x4000 * GSI_EE_AP);
20262306a36Sopenharmony_ci
20362306a36Sopenharmony_ciREG(CNTXT_SRC_CH_IRQ_MSK, cntxt_src_ch_irq_msk,
20462306a36Sopenharmony_ci    0x00012098 + 0x4000 * GSI_EE_AP);
20562306a36Sopenharmony_ci
20662306a36Sopenharmony_ciREG(CNTXT_SRC_EV_CH_IRQ_MSK, cntxt_src_ev_ch_irq_msk,
20762306a36Sopenharmony_ci    0x0001209c + 0x4000 * GSI_EE_AP);
20862306a36Sopenharmony_ci
20962306a36Sopenharmony_ciREG(CNTXT_SRC_CH_IRQ_CLR, cntxt_src_ch_irq_clr,
21062306a36Sopenharmony_ci    0x000120a0 + 0x4000 * GSI_EE_AP);
21162306a36Sopenharmony_ci
21262306a36Sopenharmony_ciREG(CNTXT_SRC_EV_CH_IRQ_CLR, cntxt_src_ev_ch_irq_clr,
21362306a36Sopenharmony_ci    0x000120a4 + 0x4000 * GSI_EE_AP);
21462306a36Sopenharmony_ci
21562306a36Sopenharmony_ciREG(CNTXT_SRC_IEOB_IRQ, cntxt_src_ieob_irq, 0x000120b0 + 0x4000 * GSI_EE_AP);
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_ciREG(CNTXT_SRC_IEOB_IRQ_MSK, cntxt_src_ieob_irq_msk,
21862306a36Sopenharmony_ci    0x000120b8 + 0x4000 * GSI_EE_AP);
21962306a36Sopenharmony_ci
22062306a36Sopenharmony_ciREG(CNTXT_SRC_IEOB_IRQ_CLR, cntxt_src_ieob_irq_clr,
22162306a36Sopenharmony_ci    0x000120c0 + 0x4000 * GSI_EE_AP);
22262306a36Sopenharmony_ci
22362306a36Sopenharmony_ciREG(CNTXT_GLOB_IRQ_STTS, cntxt_glob_irq_stts, 0x00012100 + 0x4000 * GSI_EE_AP);
22462306a36Sopenharmony_ci
22562306a36Sopenharmony_ciREG(CNTXT_GLOB_IRQ_EN, cntxt_glob_irq_en, 0x00012108 + 0x4000 * GSI_EE_AP);
22662306a36Sopenharmony_ci
22762306a36Sopenharmony_ciREG(CNTXT_GLOB_IRQ_CLR, cntxt_glob_irq_clr, 0x00012110 + 0x4000 * GSI_EE_AP);
22862306a36Sopenharmony_ci
22962306a36Sopenharmony_ciREG(CNTXT_GSI_IRQ_STTS, cntxt_gsi_irq_stts, 0x00012118 + 0x4000 * GSI_EE_AP);
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_ciREG(CNTXT_GSI_IRQ_EN, cntxt_gsi_irq_en, 0x00012120 + 0x4000 * GSI_EE_AP);
23262306a36Sopenharmony_ci
23362306a36Sopenharmony_ciREG(CNTXT_GSI_IRQ_CLR, cntxt_gsi_irq_clr, 0x00012128 + 0x4000 * GSI_EE_AP);
23462306a36Sopenharmony_ci
23562306a36Sopenharmony_cistatic const u32 reg_cntxt_intset_fmask[] = {
23662306a36Sopenharmony_ci	[INTYPE]					= BIT(0)
23762306a36Sopenharmony_ci						/* Bits 1-31 reserved */
23862306a36Sopenharmony_ci};
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_ciREG_FIELDS(CNTXT_INTSET, cntxt_intset, 0x00012180 + 0x4000 * GSI_EE_AP);
24162306a36Sopenharmony_ci
24262306a36Sopenharmony_ciREG_FIELDS(ERROR_LOG, error_log, 0x00012200 + 0x4000 * GSI_EE_AP);
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ciREG(ERROR_LOG_CLR, error_log_clr, 0x00012210 + 0x4000 * GSI_EE_AP);
24562306a36Sopenharmony_ci
24662306a36Sopenharmony_cistatic const u32 reg_cntxt_scratch_0_fmask[] = {
24762306a36Sopenharmony_ci	[INTER_EE_RESULT]				= GENMASK(2, 0),
24862306a36Sopenharmony_ci						/* Bits 3-4 reserved */
24962306a36Sopenharmony_ci	[GENERIC_EE_RESULT]				= GENMASK(7, 5),
25062306a36Sopenharmony_ci						/* Bits 8-31 reserved */
25162306a36Sopenharmony_ci};
25262306a36Sopenharmony_ci
25362306a36Sopenharmony_ciREG_FIELDS(CNTXT_SCRATCH_0, cntxt_scratch_0, 0x00012400 + 0x4000 * GSI_EE_AP);
25462306a36Sopenharmony_ci
25562306a36Sopenharmony_cistatic const struct reg *reg_array[] = {
25662306a36Sopenharmony_ci	[INTER_EE_SRC_CH_IRQ_MSK]	= &reg_inter_ee_src_ch_irq_msk,
25762306a36Sopenharmony_ci	[INTER_EE_SRC_EV_CH_IRQ_MSK]	= &reg_inter_ee_src_ev_ch_irq_msk,
25862306a36Sopenharmony_ci	[CH_C_CNTXT_0]			= &reg_ch_c_cntxt_0,
25962306a36Sopenharmony_ci	[CH_C_CNTXT_1]			= &reg_ch_c_cntxt_1,
26062306a36Sopenharmony_ci	[CH_C_CNTXT_2]			= &reg_ch_c_cntxt_2,
26162306a36Sopenharmony_ci	[CH_C_CNTXT_3]			= &reg_ch_c_cntxt_3,
26262306a36Sopenharmony_ci	[CH_C_QOS]			= &reg_ch_c_qos,
26362306a36Sopenharmony_ci	[CH_C_SCRATCH_0]		= &reg_ch_c_scratch_0,
26462306a36Sopenharmony_ci	[CH_C_SCRATCH_1]		= &reg_ch_c_scratch_1,
26562306a36Sopenharmony_ci	[CH_C_SCRATCH_2]		= &reg_ch_c_scratch_2,
26662306a36Sopenharmony_ci	[CH_C_SCRATCH_3]		= &reg_ch_c_scratch_3,
26762306a36Sopenharmony_ci	[EV_CH_E_CNTXT_0]		= &reg_ev_ch_e_cntxt_0,
26862306a36Sopenharmony_ci	[EV_CH_E_CNTXT_1]		= &reg_ev_ch_e_cntxt_1,
26962306a36Sopenharmony_ci	[EV_CH_E_CNTXT_2]		= &reg_ev_ch_e_cntxt_2,
27062306a36Sopenharmony_ci	[EV_CH_E_CNTXT_3]		= &reg_ev_ch_e_cntxt_3,
27162306a36Sopenharmony_ci	[EV_CH_E_CNTXT_4]		= &reg_ev_ch_e_cntxt_4,
27262306a36Sopenharmony_ci	[EV_CH_E_CNTXT_8]		= &reg_ev_ch_e_cntxt_8,
27362306a36Sopenharmony_ci	[EV_CH_E_CNTXT_9]		= &reg_ev_ch_e_cntxt_9,
27462306a36Sopenharmony_ci	[EV_CH_E_CNTXT_10]		= &reg_ev_ch_e_cntxt_10,
27562306a36Sopenharmony_ci	[EV_CH_E_CNTXT_11]		= &reg_ev_ch_e_cntxt_11,
27662306a36Sopenharmony_ci	[EV_CH_E_CNTXT_12]		= &reg_ev_ch_e_cntxt_12,
27762306a36Sopenharmony_ci	[EV_CH_E_CNTXT_13]		= &reg_ev_ch_e_cntxt_13,
27862306a36Sopenharmony_ci	[EV_CH_E_SCRATCH_0]		= &reg_ev_ch_e_scratch_0,
27962306a36Sopenharmony_ci	[EV_CH_E_SCRATCH_1]		= &reg_ev_ch_e_scratch_1,
28062306a36Sopenharmony_ci	[CH_C_DOORBELL_0]		= &reg_ch_c_doorbell_0,
28162306a36Sopenharmony_ci	[EV_CH_E_DOORBELL_0]		= &reg_ev_ch_e_doorbell_0,
28262306a36Sopenharmony_ci	[GSI_STATUS]			= &reg_gsi_status,
28362306a36Sopenharmony_ci	[CH_CMD]			= &reg_ch_cmd,
28462306a36Sopenharmony_ci	[EV_CH_CMD]			= &reg_ev_ch_cmd,
28562306a36Sopenharmony_ci	[GENERIC_CMD]			= &reg_generic_cmd,
28662306a36Sopenharmony_ci	[HW_PARAM_2]			= &reg_hw_param_2,
28762306a36Sopenharmony_ci	[CNTXT_TYPE_IRQ]		= &reg_cntxt_type_irq,
28862306a36Sopenharmony_ci	[CNTXT_TYPE_IRQ_MSK]		= &reg_cntxt_type_irq_msk,
28962306a36Sopenharmony_ci	[CNTXT_SRC_CH_IRQ]		= &reg_cntxt_src_ch_irq,
29062306a36Sopenharmony_ci	[CNTXT_SRC_EV_CH_IRQ]		= &reg_cntxt_src_ev_ch_irq,
29162306a36Sopenharmony_ci	[CNTXT_SRC_CH_IRQ_MSK]		= &reg_cntxt_src_ch_irq_msk,
29262306a36Sopenharmony_ci	[CNTXT_SRC_EV_CH_IRQ_MSK]	= &reg_cntxt_src_ev_ch_irq_msk,
29362306a36Sopenharmony_ci	[CNTXT_SRC_CH_IRQ_CLR]		= &reg_cntxt_src_ch_irq_clr,
29462306a36Sopenharmony_ci	[CNTXT_SRC_EV_CH_IRQ_CLR]	= &reg_cntxt_src_ev_ch_irq_clr,
29562306a36Sopenharmony_ci	[CNTXT_SRC_IEOB_IRQ]		= &reg_cntxt_src_ieob_irq,
29662306a36Sopenharmony_ci	[CNTXT_SRC_IEOB_IRQ_MSK]	= &reg_cntxt_src_ieob_irq_msk,
29762306a36Sopenharmony_ci	[CNTXT_SRC_IEOB_IRQ_CLR]	= &reg_cntxt_src_ieob_irq_clr,
29862306a36Sopenharmony_ci	[CNTXT_GLOB_IRQ_STTS]		= &reg_cntxt_glob_irq_stts,
29962306a36Sopenharmony_ci	[CNTXT_GLOB_IRQ_EN]		= &reg_cntxt_glob_irq_en,
30062306a36Sopenharmony_ci	[CNTXT_GLOB_IRQ_CLR]		= &reg_cntxt_glob_irq_clr,
30162306a36Sopenharmony_ci	[CNTXT_GSI_IRQ_STTS]		= &reg_cntxt_gsi_irq_stts,
30262306a36Sopenharmony_ci	[CNTXT_GSI_IRQ_EN]		= &reg_cntxt_gsi_irq_en,
30362306a36Sopenharmony_ci	[CNTXT_GSI_IRQ_CLR]		= &reg_cntxt_gsi_irq_clr,
30462306a36Sopenharmony_ci	[CNTXT_INTSET]			= &reg_cntxt_intset,
30562306a36Sopenharmony_ci	[ERROR_LOG]			= &reg_error_log,
30662306a36Sopenharmony_ci	[ERROR_LOG_CLR]			= &reg_error_log_clr,
30762306a36Sopenharmony_ci	[CNTXT_SCRATCH_0]		= &reg_cntxt_scratch_0,
30862306a36Sopenharmony_ci};
30962306a36Sopenharmony_ci
31062306a36Sopenharmony_ciconst struct regs gsi_regs_v4_11 = {
31162306a36Sopenharmony_ci	.reg_count	= ARRAY_SIZE(reg_array),
31262306a36Sopenharmony_ci	.reg		= reg_array,
31362306a36Sopenharmony_ci};
314