1 2 /* 3 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 21 22 #ifndef _TCL_STATUS_RING_H_ 23 #define _TCL_STATUS_RING_H_ 24 #if !defined(__ASSEMBLER__) 25 #endif 26 27 #define NUM_OF_DWORDS_TCL_STATUS_RING 8 28 29 struct tcl_status_ring { 30 uint32_t gse_ctrl : 4, 31 ase_fse_sel : 1, 32 cache_op_res : 2, 33 index_search_en : 1, 34 msdu_cnt_n : 24; 35 uint32_t msdu_byte_cnt_n : 32; 36 uint32_t msdu_timestmp_n : 32; 37 uint32_t cmd_meta_data_31_0 : 32; 38 uint32_t cmd_meta_data_63_32 : 32; 39 uint32_t hash_indx_val : 20, 40 cache_set_num : 4, 41 reserved_5a : 8; 42 uint32_t reserved_6a : 32; 43 uint32_t reserved_7a : 20, 44 ring_id : 8, 45 looping_count : 4; 46 }; 47 48 #define TCL_STATUS_RING_0_GSE_CTRL_OFFSET 0x00000000 49 #define TCL_STATUS_RING_0_GSE_CTRL_LSB 0 50 #define TCL_STATUS_RING_0_GSE_CTRL_MASK 0x0000000f 51 52 #define TCL_STATUS_RING_0_ASE_FSE_SEL_OFFSET 0x00000000 53 #define TCL_STATUS_RING_0_ASE_FSE_SEL_LSB 4 54 #define TCL_STATUS_RING_0_ASE_FSE_SEL_MASK 0x00000010 55 56 #define TCL_STATUS_RING_0_CACHE_OP_RES_OFFSET 0x00000000 57 #define TCL_STATUS_RING_0_CACHE_OP_RES_LSB 5 58 #define TCL_STATUS_RING_0_CACHE_OP_RES_MASK 0x00000060 59 60 #define TCL_STATUS_RING_0_INDEX_SEARCH_EN_OFFSET 0x00000000 61 #define TCL_STATUS_RING_0_INDEX_SEARCH_EN_LSB 7 62 #define TCL_STATUS_RING_0_INDEX_SEARCH_EN_MASK 0x00000080 63 64 #define TCL_STATUS_RING_0_MSDU_CNT_N_OFFSET 0x00000000 65 #define TCL_STATUS_RING_0_MSDU_CNT_N_LSB 8 66 #define TCL_STATUS_RING_0_MSDU_CNT_N_MASK 0xffffff00 67 68 #define TCL_STATUS_RING_1_MSDU_BYTE_CNT_N_OFFSET 0x00000004 69 #define TCL_STATUS_RING_1_MSDU_BYTE_CNT_N_LSB 0 70 #define TCL_STATUS_RING_1_MSDU_BYTE_CNT_N_MASK 0xffffffff 71 72 #define TCL_STATUS_RING_2_MSDU_TIMESTMP_N_OFFSET 0x00000008 73 #define TCL_STATUS_RING_2_MSDU_TIMESTMP_N_LSB 0 74 #define TCL_STATUS_RING_2_MSDU_TIMESTMP_N_MASK 0xffffffff 75 76 #define TCL_STATUS_RING_3_CMD_META_DATA_31_0_OFFSET 0x0000000c 77 #define TCL_STATUS_RING_3_CMD_META_DATA_31_0_LSB 0 78 #define TCL_STATUS_RING_3_CMD_META_DATA_31_0_MASK 0xffffffff 79 80 #define TCL_STATUS_RING_4_CMD_META_DATA_63_32_OFFSET 0x00000010 81 #define TCL_STATUS_RING_4_CMD_META_DATA_63_32_LSB 0 82 #define TCL_STATUS_RING_4_CMD_META_DATA_63_32_MASK 0xffffffff 83 84 #define TCL_STATUS_RING_5_HASH_INDX_VAL_OFFSET 0x00000014 85 #define TCL_STATUS_RING_5_HASH_INDX_VAL_LSB 0 86 #define TCL_STATUS_RING_5_HASH_INDX_VAL_MASK 0x000fffff 87 88 #define TCL_STATUS_RING_5_CACHE_SET_NUM_OFFSET 0x00000014 89 #define TCL_STATUS_RING_5_CACHE_SET_NUM_LSB 20 90 #define TCL_STATUS_RING_5_CACHE_SET_NUM_MASK 0x00f00000 91 92 #define TCL_STATUS_RING_5_RESERVED_5A_OFFSET 0x00000014 93 #define TCL_STATUS_RING_5_RESERVED_5A_LSB 24 94 #define TCL_STATUS_RING_5_RESERVED_5A_MASK 0xff000000 95 96 #define TCL_STATUS_RING_6_RESERVED_6A_OFFSET 0x00000018 97 #define TCL_STATUS_RING_6_RESERVED_6A_LSB 0 98 #define TCL_STATUS_RING_6_RESERVED_6A_MASK 0xffffffff 99 100 #define TCL_STATUS_RING_7_RESERVED_7A_OFFSET 0x0000001c 101 #define TCL_STATUS_RING_7_RESERVED_7A_LSB 0 102 #define TCL_STATUS_RING_7_RESERVED_7A_MASK 0x000fffff 103 104 #define TCL_STATUS_RING_7_RING_ID_OFFSET 0x0000001c 105 #define TCL_STATUS_RING_7_RING_ID_LSB 20 106 #define TCL_STATUS_RING_7_RING_ID_MASK 0x0ff00000 107 108 #define TCL_STATUS_RING_7_LOOPING_COUNT_OFFSET 0x0000001c 109 #define TCL_STATUS_RING_7_LOOPING_COUNT_LSB 28 110 #define TCL_STATUS_RING_7_LOOPING_COUNT_MASK 0xf0000000 111 112 #endif 113