107f120bcSAlex Elder // SPDX-License-Identifier: GPL-2.0 207f120bcSAlex Elder 307f120bcSAlex Elder /* Copyright (C) 2022 Linaro Ltd. */ 407f120bcSAlex Elder 507f120bcSAlex Elder #include <linux/types.h> 607f120bcSAlex Elder 707f120bcSAlex Elder #include "../ipa.h" 807f120bcSAlex Elder #include "../ipa_reg.h" 907f120bcSAlex Elder 1012c7ea7dSAlex Elder static const u32 ipa_reg_comp_cfg_fmask[] = { 1112c7ea7dSAlex Elder [RAM_ARB_PRI_CLIENT_SAMP_FIX_DIS] = BIT(0), 1212c7ea7dSAlex Elder [GSI_SNOC_BYPASS_DIS] = BIT(1), 1312c7ea7dSAlex Elder [GEN_QMB_0_SNOC_BYPASS_DIS] = BIT(2), 1412c7ea7dSAlex Elder [GEN_QMB_1_SNOC_BYPASS_DIS] = BIT(3), 1512c7ea7dSAlex Elder /* Bit 4 reserved */ 1612c7ea7dSAlex Elder [IPA_QMB_SELECT_CONS_EN] = BIT(5), 1712c7ea7dSAlex Elder [IPA_QMB_SELECT_PROD_EN] = BIT(6), 1812c7ea7dSAlex Elder [GSI_MULTI_INORDER_RD_DIS] = BIT(7), 1912c7ea7dSAlex Elder [GSI_MULTI_INORDER_WR_DIS] = BIT(8), 2012c7ea7dSAlex Elder [GEN_QMB_0_MULTI_INORDER_RD_DIS] = BIT(9), 2112c7ea7dSAlex Elder [GEN_QMB_1_MULTI_INORDER_RD_DIS] = BIT(10), 2212c7ea7dSAlex Elder [GEN_QMB_0_MULTI_INORDER_WR_DIS] = BIT(11), 2312c7ea7dSAlex Elder [GEN_QMB_1_MULTI_INORDER_WR_DIS] = BIT(12), 2412c7ea7dSAlex Elder [GEN_QMB_0_SNOC_CNOC_LOOP_PROT_DIS] = BIT(13), 2512c7ea7dSAlex Elder [GSI_SNOC_CNOC_LOOP_PROT_DISABLE] = BIT(14), 2612c7ea7dSAlex Elder [GSI_MULTI_AXI_MASTERS_DIS] = BIT(15), 2712c7ea7dSAlex Elder [IPA_QMB_SELECT_GLOBAL_EN] = BIT(16), 2812c7ea7dSAlex Elder [FULL_FLUSH_WAIT_RS_CLOSURE_EN] = BIT(17), 2912c7ea7dSAlex Elder /* Bit 18 reserved */ 3012c7ea7dSAlex Elder [QMB_RAM_RD_CACHE_DISABLE] = BIT(19), 3112c7ea7dSAlex Elder [GENQMB_AOOOWR] = BIT(20), 3212c7ea7dSAlex Elder [IF_OUT_OF_BUF_STOP_RESET_MASK_EN] = BIT(21), 3312c7ea7dSAlex Elder [ATOMIC_FETCHER_ARB_LOCK_DIS] = GENMASK(23, 22), 3412c7ea7dSAlex Elder /* Bits 24-29 reserved */ 3512c7ea7dSAlex Elder [GEN_QMB_1_DYNAMIC_ASIZE] = BIT(30), 3612c7ea7dSAlex Elder [GEN_QMB_0_DYNAMIC_ASIZE] = BIT(31), 3712c7ea7dSAlex Elder }; 3812c7ea7dSAlex Elder 3912c7ea7dSAlex Elder IPA_REG_FIELDS(COMP_CFG, comp_cfg, 0x0000003c); 4007f120bcSAlex Elder 41479deb32SAlex Elder static const u32 ipa_reg_clkon_cfg_fmask[] = { 42479deb32SAlex Elder [CLKON_RX] = BIT(0), 43479deb32SAlex Elder [CLKON_PROC] = BIT(1), 44479deb32SAlex Elder [TX_WRAPPER] = BIT(2), 45479deb32SAlex Elder [CLKON_MISC] = BIT(3), 46479deb32SAlex Elder [RAM_ARB] = BIT(4), 47479deb32SAlex Elder [FTCH_HPS] = BIT(5), 48479deb32SAlex Elder [FTCH_DPS] = BIT(6), 49479deb32SAlex Elder [CLKON_HPS] = BIT(7), 50479deb32SAlex Elder [CLKON_DPS] = BIT(8), 51479deb32SAlex Elder [RX_HPS_CMDQS] = BIT(9), 52479deb32SAlex Elder [HPS_DPS_CMDQS] = BIT(10), 53479deb32SAlex Elder [DPS_TX_CMDQS] = BIT(11), 54479deb32SAlex Elder [RSRC_MNGR] = BIT(12), 55479deb32SAlex Elder [CTX_HANDLER] = BIT(13), 56479deb32SAlex Elder [ACK_MNGR] = BIT(14), 57479deb32SAlex Elder [D_DCPH] = BIT(15), 58479deb32SAlex Elder [H_DCPH] = BIT(16), 59479deb32SAlex Elder /* Bit 17 reserved */ 60479deb32SAlex Elder [NTF_TX_CMDQS] = BIT(18), 61479deb32SAlex Elder [CLKON_TX_0] = BIT(19), 62479deb32SAlex Elder [CLKON_TX_1] = BIT(20), 63479deb32SAlex Elder [CLKON_FNR] = BIT(21), 64479deb32SAlex Elder [QSB2AXI_CMDQ_L] = BIT(22), 65479deb32SAlex Elder [AGGR_WRAPPER] = BIT(23), 66479deb32SAlex Elder [RAM_SLAVEWAY] = BIT(24), 67479deb32SAlex Elder [CLKON_QMB] = BIT(25), 68479deb32SAlex Elder [WEIGHT_ARB] = BIT(26), 69479deb32SAlex Elder [GSI_IF] = BIT(27), 70479deb32SAlex Elder [CLKON_GLOBAL] = BIT(28), 71479deb32SAlex Elder [GLOBAL_2X_CLK] = BIT(29), 72479deb32SAlex Elder [DPL_FIFO] = BIT(30), 73479deb32SAlex Elder [DRBIP] = BIT(31), 74479deb32SAlex Elder }; 7507f120bcSAlex Elder 76479deb32SAlex Elder IPA_REG_FIELDS(CLKON_CFG, clkon_cfg, 0x00000044); 77479deb32SAlex Elder 78479deb32SAlex Elder static const u32 ipa_reg_route_fmask[] = { 79479deb32SAlex Elder [ROUTE_DIS] = BIT(0), 80479deb32SAlex Elder [ROUTE_DEF_PIPE] = GENMASK(5, 1), 81479deb32SAlex Elder [ROUTE_DEF_HDR_TABLE] = BIT(6), 82479deb32SAlex Elder [ROUTE_DEF_HDR_OFST] = GENMASK(16, 7), 83479deb32SAlex Elder [ROUTE_FRAG_DEF_PIPE] = GENMASK(21, 17), 84479deb32SAlex Elder /* Bits 22-23 reserved */ 85479deb32SAlex Elder [ROUTE_DEF_RETAIN_HDR] = BIT(24), 86479deb32SAlex Elder /* Bits 25-31 reserved */ 87479deb32SAlex Elder }; 88479deb32SAlex Elder 89479deb32SAlex Elder IPA_REG_FIELDS(ROUTE, route, 0x00000048); 9007f120bcSAlex Elder 9162b9c009SAlex Elder static const u32 ipa_reg_shared_mem_size_fmask[] = { 9262b9c009SAlex Elder [MEM_SIZE] = GENMASK(15, 0), 9362b9c009SAlex Elder [MEM_BADDR] = GENMASK(31, 16), 9462b9c009SAlex Elder }; 9507f120bcSAlex Elder 9662b9c009SAlex Elder IPA_REG_FIELDS(SHARED_MEM_SIZE, shared_mem_size, 0x00000054); 9707f120bcSAlex Elder 9862b9c009SAlex Elder static const u32 ipa_reg_qsb_max_writes_fmask[] = { 9962b9c009SAlex Elder [GEN_QMB_0_MAX_WRITES] = GENMASK(3, 0), 10062b9c009SAlex Elder [GEN_QMB_1_MAX_WRITES] = GENMASK(7, 4), 10162b9c009SAlex Elder /* Bits 8-31 reserved */ 10262b9c009SAlex Elder }; 10307f120bcSAlex Elder 10462b9c009SAlex Elder IPA_REG_FIELDS(QSB_MAX_WRITES, qsb_max_writes, 0x00000074); 10507f120bcSAlex Elder 10662b9c009SAlex Elder static const u32 ipa_reg_qsb_max_reads_fmask[] = { 10762b9c009SAlex Elder [GEN_QMB_0_MAX_READS] = GENMASK(3, 0), 10862b9c009SAlex Elder [GEN_QMB_1_MAX_READS] = GENMASK(7, 4), 10962b9c009SAlex Elder /* Bits 8-15 reserved */ 11062b9c009SAlex Elder [GEN_QMB_0_MAX_READS_BEATS] = GENMASK(23, 16), 11162b9c009SAlex Elder [GEN_QMB_1_MAX_READS_BEATS] = GENMASK(31, 24), 11262b9c009SAlex Elder }; 11362b9c009SAlex Elder 11462b9c009SAlex Elder IPA_REG_FIELDS(QSB_MAX_READS, qsb_max_reads, 0x00000078); 11562b9c009SAlex Elder 11662b9c009SAlex Elder static const u32 ipa_reg_filt_rout_hash_en_fmask[] = { 11762b9c009SAlex Elder [IPV6_ROUTER_HASH] = BIT(0), 11862b9c009SAlex Elder /* Bits 1-3 reserved */ 11962b9c009SAlex Elder [IPV6_FILTER_HASH] = BIT(4), 12062b9c009SAlex Elder /* Bits 5-7 reserved */ 12162b9c009SAlex Elder [IPV4_ROUTER_HASH] = BIT(8), 12262b9c009SAlex Elder /* Bits 9-11 reserved */ 12362b9c009SAlex Elder [IPV4_FILTER_HASH] = BIT(12), 12462b9c009SAlex Elder /* Bits 13-31 reserved */ 12562b9c009SAlex Elder }; 12662b9c009SAlex Elder 12762b9c009SAlex Elder IPA_REG_FIELDS(FILT_ROUT_HASH_EN, filt_rout_hash_en, 0x0000148); 12862b9c009SAlex Elder 12962b9c009SAlex Elder static const u32 ipa_reg_filt_rout_hash_flush_fmask[] = { 13062b9c009SAlex Elder [IPV6_ROUTER_HASH] = BIT(0), 13162b9c009SAlex Elder /* Bits 1-3 reserved */ 13262b9c009SAlex Elder [IPV6_FILTER_HASH] = BIT(4), 13362b9c009SAlex Elder /* Bits 5-7 reserved */ 13462b9c009SAlex Elder [IPV4_ROUTER_HASH] = BIT(8), 13562b9c009SAlex Elder /* Bits 9-11 reserved */ 13662b9c009SAlex Elder [IPV4_FILTER_HASH] = BIT(12), 13762b9c009SAlex Elder /* Bits 13-31 reserved */ 13862b9c009SAlex Elder }; 13962b9c009SAlex Elder 14062b9c009SAlex Elder IPA_REG_FIELDS(FILT_ROUT_HASH_FLUSH, filt_rout_hash_flush, 0x000014c); 14107f120bcSAlex Elder 14207f120bcSAlex Elder /* Valid bits defined by ipa->available */ 14307f120bcSAlex Elder IPA_REG(STATE_AGGR_ACTIVE, state_aggr_active, 0x000000b4); 14407f120bcSAlex Elder 145b5c35fa4SAlex Elder static const u32 ipa_reg_local_pkt_proc_cntxt_fmask[] = { 146b5c35fa4SAlex Elder [IPA_BASE_ADDR] = GENMASK(17, 0), 147b5c35fa4SAlex Elder /* Bits 18-31 reserved */ 148b5c35fa4SAlex Elder }; 149b5c35fa4SAlex Elder 15007f120bcSAlex Elder /* Offset must be a multiple of 8 */ 151b5c35fa4SAlex Elder IPA_REG_FIELDS(LOCAL_PKT_PROC_CNTXT, local_pkt_proc_cntxt, 0x000001e8); 15207f120bcSAlex Elder 15307f120bcSAlex Elder /* Valid bits defined by ipa->available */ 15407f120bcSAlex Elder IPA_REG(AGGR_FORCE_CLOSE, aggr_force_close, 0x000001ec); 15507f120bcSAlex Elder 156b5c35fa4SAlex Elder static const u32 ipa_reg_ipa_tx_cfg_fmask[] = { 157b5c35fa4SAlex Elder /* Bits 0-1 reserved */ 158b5c35fa4SAlex Elder [PREFETCH_ALMOST_EMPTY_SIZE_TX0] = GENMASK(5, 2), 159b5c35fa4SAlex Elder [DMAW_SCND_OUTSD_PRED_THRESHOLD] = GENMASK(9, 6), 160b5c35fa4SAlex Elder [DMAW_SCND_OUTSD_PRED_EN] = BIT(10), 161b5c35fa4SAlex Elder [DMAW_MAX_BEATS_256_DIS] = BIT(11), 162b5c35fa4SAlex Elder [PA_MASK_EN] = BIT(12), 163b5c35fa4SAlex Elder [PREFETCH_ALMOST_EMPTY_SIZE_TX1] = GENMASK(16, 13), 164b5c35fa4SAlex Elder [DUAL_TX_ENABLE] = BIT(17), 165b5c35fa4SAlex Elder [SSPND_PA_NO_START_STATE] = BIT(18), 166b5c35fa4SAlex Elder /* Bits 19-31 reserved */ 167b5c35fa4SAlex Elder }; 168b5c35fa4SAlex Elder 169b5c35fa4SAlex Elder IPA_REG_FIELDS(IPA_TX_CFG, ipa_tx_cfg, 0x000001fc); 17007f120bcSAlex Elder 1719265a4f0SAlex Elder static const u32 ipa_reg_flavor_0_fmask[] = { 1729265a4f0SAlex Elder [MAX_PIPES] = GENMASK(4, 0), 1739265a4f0SAlex Elder /* Bits 5-7 reserved */ 1749265a4f0SAlex Elder [MAX_CONS_PIPES] = GENMASK(12, 8), 1759265a4f0SAlex Elder /* Bits 13-15 reserved */ 1769265a4f0SAlex Elder [MAX_PROD_PIPES] = GENMASK(20, 16), 1779265a4f0SAlex Elder /* Bits 21-23 reserved */ 1789265a4f0SAlex Elder [PROD_LOWEST] = GENMASK(27, 24), 1799265a4f0SAlex Elder /* Bits 28-31 reserved */ 1809265a4f0SAlex Elder }; 18107f120bcSAlex Elder 1829265a4f0SAlex Elder IPA_REG_FIELDS(FLAVOR_0, flavor_0, 0x00000210); 18307f120bcSAlex Elder 1849265a4f0SAlex Elder static const u32 ipa_reg_idle_indication_cfg_fmask[] = { 1859265a4f0SAlex Elder [ENTER_IDLE_DEBOUNCE_THRESH] = GENMASK(15, 0), 1869265a4f0SAlex Elder [CONST_NON_IDLE_ENABLE] = BIT(16), 1879265a4f0SAlex Elder /* Bits 17-31 reserved */ 1889265a4f0SAlex Elder }; 18907f120bcSAlex Elder 1909265a4f0SAlex Elder IPA_REG_FIELDS(IDLE_INDICATION_CFG, idle_indication_cfg, 0x00000240); 19107f120bcSAlex Elder 1929265a4f0SAlex Elder static const u32 ipa_reg_qtime_timestamp_cfg_fmask[] = { 1939265a4f0SAlex Elder [DPL_TIMESTAMP_LSB] = GENMASK(4, 0), 1949265a4f0SAlex Elder /* Bits 5-6 reserved */ 1959265a4f0SAlex Elder [DPL_TIMESTAMP_SEL] = BIT(7), 1969265a4f0SAlex Elder [TAG_TIMESTAMP_LSB] = GENMASK(12, 8), 1979265a4f0SAlex Elder /* Bits 13-15 reserved */ 1989265a4f0SAlex Elder [NAT_TIMESTAMP_LSB] = GENMASK(20, 16), 1999265a4f0SAlex Elder /* Bits 21-31 reserved */ 2009265a4f0SAlex Elder }; 2019265a4f0SAlex Elder 2029265a4f0SAlex Elder IPA_REG_FIELDS(QTIME_TIMESTAMP_CFG, qtime_timestamp_cfg, 0x0000024c); 2039265a4f0SAlex Elder 2049265a4f0SAlex Elder static const u32 ipa_reg_timers_xo_clk_div_cfg_fmask[] = { 2059265a4f0SAlex Elder [DIV_VALUE] = GENMASK(8, 0), 2069265a4f0SAlex Elder /* Bits 9-30 reserved */ 2079265a4f0SAlex Elder [DIV_ENABLE] = BIT(31), 2089265a4f0SAlex Elder }; 2099265a4f0SAlex Elder 2109265a4f0SAlex Elder IPA_REG_FIELDS(TIMERS_XO_CLK_DIV_CFG, timers_xo_clk_div_cfg, 0x00000250); 2119265a4f0SAlex Elder 2129265a4f0SAlex Elder static const u32 ipa_reg_timers_pulse_gran_cfg_fmask[] = { 2139265a4f0SAlex Elder [PULSE_GRAN_0] = GENMASK(2, 0), 2149265a4f0SAlex Elder [PULSE_GRAN_1] = GENMASK(5, 3), 2159265a4f0SAlex Elder [PULSE_GRAN_2] = GENMASK(8, 6), 2169265a4f0SAlex Elder /* Bits 9-31 reserved */ 2179265a4f0SAlex Elder }; 2189265a4f0SAlex Elder 2199265a4f0SAlex Elder IPA_REG_FIELDS(TIMERS_PULSE_GRAN_CFG, timers_pulse_gran_cfg, 0x00000254); 22007f120bcSAlex Elder 221*1c418c4aSAlex Elder static const u32 ipa_reg_src_rsrc_grp_01_rsrc_type_fmask[] = { 222*1c418c4aSAlex Elder [X_MIN_LIM] = GENMASK(5, 0), 223*1c418c4aSAlex Elder /* Bits 6-7 reserved */ 224*1c418c4aSAlex Elder [X_MAX_LIM] = GENMASK(13, 8), 225*1c418c4aSAlex Elder /* Bits 14-15 reserved */ 226*1c418c4aSAlex Elder [Y_MIN_LIM] = GENMASK(21, 16), 227*1c418c4aSAlex Elder /* Bits 22-23 reserved */ 228*1c418c4aSAlex Elder [Y_MAX_LIM] = GENMASK(29, 24), 229*1c418c4aSAlex Elder /* Bits 30-31 reserved */ 230*1c418c4aSAlex Elder }; 231*1c418c4aSAlex Elder 232*1c418c4aSAlex Elder IPA_REG_STRIDE_FIELDS(SRC_RSRC_GRP_01_RSRC_TYPE, src_rsrc_grp_01_rsrc_type, 23307f120bcSAlex Elder 0x00000400, 0x0020); 23407f120bcSAlex Elder 235*1c418c4aSAlex Elder static const u32 ipa_reg_src_rsrc_grp_23_rsrc_type_fmask[] = { 236*1c418c4aSAlex Elder [X_MIN_LIM] = GENMASK(5, 0), 237*1c418c4aSAlex Elder /* Bits 6-7 reserved */ 238*1c418c4aSAlex Elder [X_MAX_LIM] = GENMASK(13, 8), 239*1c418c4aSAlex Elder /* Bits 14-15 reserved */ 240*1c418c4aSAlex Elder [Y_MIN_LIM] = GENMASK(21, 16), 241*1c418c4aSAlex Elder /* Bits 22-23 reserved */ 242*1c418c4aSAlex Elder [Y_MAX_LIM] = GENMASK(29, 24), 243*1c418c4aSAlex Elder /* Bits 30-31 reserved */ 244*1c418c4aSAlex Elder }; 245*1c418c4aSAlex Elder 246*1c418c4aSAlex Elder IPA_REG_STRIDE_FIELDS(SRC_RSRC_GRP_23_RSRC_TYPE, src_rsrc_grp_23_rsrc_type, 24707f120bcSAlex Elder 0x00000404, 0x0020); 24807f120bcSAlex Elder 249*1c418c4aSAlex Elder static const u32 ipa_reg_dst_rsrc_grp_01_rsrc_type_fmask[] = { 250*1c418c4aSAlex Elder [X_MIN_LIM] = GENMASK(5, 0), 251*1c418c4aSAlex Elder /* Bits 6-7 reserved */ 252*1c418c4aSAlex Elder [X_MAX_LIM] = GENMASK(13, 8), 253*1c418c4aSAlex Elder /* Bits 14-15 reserved */ 254*1c418c4aSAlex Elder [Y_MIN_LIM] = GENMASK(21, 16), 255*1c418c4aSAlex Elder /* Bits 22-23 reserved */ 256*1c418c4aSAlex Elder [Y_MAX_LIM] = GENMASK(29, 24), 257*1c418c4aSAlex Elder /* Bits 30-31 reserved */ 258*1c418c4aSAlex Elder }; 259*1c418c4aSAlex Elder 260*1c418c4aSAlex Elder IPA_REG_STRIDE_FIELDS(DST_RSRC_GRP_01_RSRC_TYPE, dst_rsrc_grp_01_rsrc_type, 26107f120bcSAlex Elder 0x00000500, 0x0020); 26207f120bcSAlex Elder 263*1c418c4aSAlex Elder static const u32 ipa_reg_dst_rsrc_grp_23_rsrc_type_fmask[] = { 264*1c418c4aSAlex Elder [X_MIN_LIM] = GENMASK(5, 0), 265*1c418c4aSAlex Elder /* Bits 6-7 reserved */ 266*1c418c4aSAlex Elder [X_MAX_LIM] = GENMASK(13, 8), 267*1c418c4aSAlex Elder /* Bits 14-15 reserved */ 268*1c418c4aSAlex Elder [Y_MIN_LIM] = GENMASK(21, 16), 269*1c418c4aSAlex Elder /* Bits 22-23 reserved */ 270*1c418c4aSAlex Elder [Y_MAX_LIM] = GENMASK(29, 24), 271*1c418c4aSAlex Elder /* Bits 30-31 reserved */ 272*1c418c4aSAlex Elder }; 273*1c418c4aSAlex Elder 274*1c418c4aSAlex Elder IPA_REG_STRIDE_FIELDS(DST_RSRC_GRP_23_RSRC_TYPE, dst_rsrc_grp_23_rsrc_type, 27507f120bcSAlex Elder 0x00000504, 0x0020); 27607f120bcSAlex Elder 27707f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_CFG, endp_init_cfg, 0x00000808, 0x0070); 27807f120bcSAlex Elder 27907f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_NAT, endp_init_nat, 0x0000080c, 0x0070); 28007f120bcSAlex Elder 28107f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_HDR, endp_init_hdr, 0x00000810, 0x0070); 28207f120bcSAlex Elder 28307f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_HDR_EXT, endp_init_hdr_ext, 0x00000814, 0x0070); 28407f120bcSAlex Elder 28507f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_HDR_METADATA_MASK, endp_init_hdr_metadata_mask, 28607f120bcSAlex Elder 0x00000818, 0x0070); 28707f120bcSAlex Elder 28807f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_MODE, endp_init_mode, 0x00000820, 0x0070); 28907f120bcSAlex Elder 29007f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_AGGR, endp_init_aggr, 0x00000824, 0x0070); 29107f120bcSAlex Elder 29207f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_HOL_BLOCK_EN, endp_init_hol_block_en, 29307f120bcSAlex Elder 0x0000082c, 0x0070); 29407f120bcSAlex Elder 29507f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_HOL_BLOCK_TIMER, endp_init_hol_block_timer, 29607f120bcSAlex Elder 0x00000830, 0x0070); 29707f120bcSAlex Elder 29807f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_DEAGGR, endp_init_deaggr, 0x00000834, 0x0070); 29907f120bcSAlex Elder 30007f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_RSRC_GRP, endp_init_rsrc_grp, 0x00000838, 0x0070); 30107f120bcSAlex Elder 30207f120bcSAlex Elder IPA_REG_STRIDE(ENDP_INIT_SEQ, endp_init_seq, 0x0000083c, 0x0070); 30307f120bcSAlex Elder 30407f120bcSAlex Elder IPA_REG_STRIDE(ENDP_STATUS, endp_status, 0x00000840, 0x0070); 30507f120bcSAlex Elder 30607f120bcSAlex Elder IPA_REG_STRIDE(ENDP_FILTER_ROUTER_HSH_CFG, endp_filter_router_hsh_cfg, 30707f120bcSAlex Elder 0x0000085c, 0x0070); 30807f120bcSAlex Elder 30907f120bcSAlex Elder /* Valid bits defined by enum ipa_irq_id; only used for GSI_EE_AP */ 31007f120bcSAlex Elder IPA_REG(IPA_IRQ_STTS, ipa_irq_stts, 0x00004008 + 0x1000 * GSI_EE_AP); 31107f120bcSAlex Elder 31207f120bcSAlex Elder /* Valid bits defined by enum ipa_irq_id; only used for GSI_EE_AP */ 31307f120bcSAlex Elder IPA_REG(IPA_IRQ_EN, ipa_irq_en, 0x0000400c + 0x1000 * GSI_EE_AP); 31407f120bcSAlex Elder 31507f120bcSAlex Elder /* Valid bits defined by enum ipa_irq_id; only used for GSI_EE_AP */ 31607f120bcSAlex Elder IPA_REG(IPA_IRQ_CLR, ipa_irq_clr, 0x00004010 + 0x1000 * GSI_EE_AP); 31707f120bcSAlex Elder 31807f120bcSAlex Elder IPA_REG(IPA_IRQ_UC, ipa_irq_uc, 0x0000401c + 0x1000 * GSI_EE_AP); 31907f120bcSAlex Elder 32007f120bcSAlex Elder /* Valid bits defined by ipa->available */ 32107f120bcSAlex Elder IPA_REG(IRQ_SUSPEND_INFO, irq_suspend_info, 0x00004030 + 0x1000 * GSI_EE_AP); 32207f120bcSAlex Elder 32307f120bcSAlex Elder /* Valid bits defined by ipa->available */ 32407f120bcSAlex Elder IPA_REG(IRQ_SUSPEND_EN, irq_suspend_en, 0x00004034 + 0x1000 * GSI_EE_AP); 32507f120bcSAlex Elder 32607f120bcSAlex Elder /* Valid bits defined by ipa->available */ 32707f120bcSAlex Elder IPA_REG(IRQ_SUSPEND_CLR, irq_suspend_clr, 0x00004038 + 0x1000 * GSI_EE_AP); 32807f120bcSAlex Elder 32907f120bcSAlex Elder static const struct ipa_reg *ipa_reg_array[] = { 33007f120bcSAlex Elder [COMP_CFG] = &ipa_reg_comp_cfg, 33107f120bcSAlex Elder [CLKON_CFG] = &ipa_reg_clkon_cfg, 33207f120bcSAlex Elder [ROUTE] = &ipa_reg_route, 33307f120bcSAlex Elder [SHARED_MEM_SIZE] = &ipa_reg_shared_mem_size, 33407f120bcSAlex Elder [QSB_MAX_WRITES] = &ipa_reg_qsb_max_writes, 33507f120bcSAlex Elder [QSB_MAX_READS] = &ipa_reg_qsb_max_reads, 33607f120bcSAlex Elder [FILT_ROUT_HASH_EN] = &ipa_reg_filt_rout_hash_en, 33707f120bcSAlex Elder [FILT_ROUT_HASH_FLUSH] = &ipa_reg_filt_rout_hash_flush, 33807f120bcSAlex Elder [STATE_AGGR_ACTIVE] = &ipa_reg_state_aggr_active, 33907f120bcSAlex Elder [LOCAL_PKT_PROC_CNTXT] = &ipa_reg_local_pkt_proc_cntxt, 34007f120bcSAlex Elder [AGGR_FORCE_CLOSE] = &ipa_reg_aggr_force_close, 34107f120bcSAlex Elder [IPA_TX_CFG] = &ipa_reg_ipa_tx_cfg, 34207f120bcSAlex Elder [FLAVOR_0] = &ipa_reg_flavor_0, 34307f120bcSAlex Elder [IDLE_INDICATION_CFG] = &ipa_reg_idle_indication_cfg, 34407f120bcSAlex Elder [QTIME_TIMESTAMP_CFG] = &ipa_reg_qtime_timestamp_cfg, 34507f120bcSAlex Elder [TIMERS_XO_CLK_DIV_CFG] = &ipa_reg_timers_xo_clk_div_cfg, 34607f120bcSAlex Elder [TIMERS_PULSE_GRAN_CFG] = &ipa_reg_timers_pulse_gran_cfg, 34707f120bcSAlex Elder [SRC_RSRC_GRP_01_RSRC_TYPE] = &ipa_reg_src_rsrc_grp_01_rsrc_type, 34807f120bcSAlex Elder [SRC_RSRC_GRP_23_RSRC_TYPE] = &ipa_reg_src_rsrc_grp_23_rsrc_type, 34907f120bcSAlex Elder [DST_RSRC_GRP_01_RSRC_TYPE] = &ipa_reg_dst_rsrc_grp_01_rsrc_type, 35007f120bcSAlex Elder [DST_RSRC_GRP_23_RSRC_TYPE] = &ipa_reg_dst_rsrc_grp_23_rsrc_type, 35107f120bcSAlex Elder [ENDP_INIT_CFG] = &ipa_reg_endp_init_cfg, 35207f120bcSAlex Elder [ENDP_INIT_NAT] = &ipa_reg_endp_init_nat, 35307f120bcSAlex Elder [ENDP_INIT_HDR] = &ipa_reg_endp_init_hdr, 35407f120bcSAlex Elder [ENDP_INIT_HDR_EXT] = &ipa_reg_endp_init_hdr_ext, 35507f120bcSAlex Elder [ENDP_INIT_HDR_METADATA_MASK] = &ipa_reg_endp_init_hdr_metadata_mask, 35607f120bcSAlex Elder [ENDP_INIT_MODE] = &ipa_reg_endp_init_mode, 35707f120bcSAlex Elder [ENDP_INIT_AGGR] = &ipa_reg_endp_init_aggr, 35807f120bcSAlex Elder [ENDP_INIT_HOL_BLOCK_EN] = &ipa_reg_endp_init_hol_block_en, 35907f120bcSAlex Elder [ENDP_INIT_HOL_BLOCK_TIMER] = &ipa_reg_endp_init_hol_block_timer, 36007f120bcSAlex Elder [ENDP_INIT_DEAGGR] = &ipa_reg_endp_init_deaggr, 36107f120bcSAlex Elder [ENDP_INIT_RSRC_GRP] = &ipa_reg_endp_init_rsrc_grp, 36207f120bcSAlex Elder [ENDP_INIT_SEQ] = &ipa_reg_endp_init_seq, 36307f120bcSAlex Elder [ENDP_STATUS] = &ipa_reg_endp_status, 36407f120bcSAlex Elder [ENDP_FILTER_ROUTER_HSH_CFG] = &ipa_reg_endp_filter_router_hsh_cfg, 36507f120bcSAlex Elder [IPA_IRQ_STTS] = &ipa_reg_ipa_irq_stts, 36607f120bcSAlex Elder [IPA_IRQ_EN] = &ipa_reg_ipa_irq_en, 36707f120bcSAlex Elder [IPA_IRQ_CLR] = &ipa_reg_ipa_irq_clr, 36807f120bcSAlex Elder [IPA_IRQ_UC] = &ipa_reg_ipa_irq_uc, 36907f120bcSAlex Elder [IRQ_SUSPEND_INFO] = &ipa_reg_irq_suspend_info, 37007f120bcSAlex Elder [IRQ_SUSPEND_EN] = &ipa_reg_irq_suspend_en, 37107f120bcSAlex Elder [IRQ_SUSPEND_CLR] = &ipa_reg_irq_suspend_clr, 37207f120bcSAlex Elder }; 37307f120bcSAlex Elder 37407f120bcSAlex Elder const struct ipa_regs ipa_regs_v4_11 = { 37507f120bcSAlex Elder .reg_count = ARRAY_SIZE(ipa_reg_array), 37607f120bcSAlex Elder .reg = ipa_reg_array, 37707f120bcSAlex Elder }; 378