1 2 /* 3 * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. 4 * SPDX-License-Identifier: ISC 5 */ 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #ifndef _CE_STAT_DESC_H_ 20 #define _CE_STAT_DESC_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 #define NUM_OF_DWORDS_CE_STAT_DESC 4 25 26 27 struct ce_stat_desc { 28 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 29 uint32_t ce_res_5 : 8, 30 toeplitz_en : 1, 31 src_swap : 1, 32 dest_swap : 1, 33 gather : 1, 34 barrier_read : 1, 35 ce_res_6 : 3, 36 length : 16; 37 uint32_t toeplitz_hash_0 : 32; 38 uint32_t toeplitz_hash_1 : 32; 39 uint32_t fw_metadata : 16, 40 ce_res_7 : 4, 41 ring_id : 8, 42 looping_count : 4; 43 #else 44 uint32_t length : 16, 45 ce_res_6 : 3, 46 barrier_read : 1, 47 gather : 1, 48 dest_swap : 1, 49 src_swap : 1, 50 toeplitz_en : 1, 51 ce_res_5 : 8; 52 uint32_t toeplitz_hash_0 : 32; 53 uint32_t toeplitz_hash_1 : 32; 54 uint32_t looping_count : 4, 55 ring_id : 8, 56 ce_res_7 : 4, 57 fw_metadata : 16; 58 #endif 59 }; 60 61 62 63 64 #define CE_STAT_DESC_CE_RES_5_OFFSET 0x00000000 65 #define CE_STAT_DESC_CE_RES_5_LSB 0 66 #define CE_STAT_DESC_CE_RES_5_MSB 7 67 #define CE_STAT_DESC_CE_RES_5_MASK 0x000000ff 68 69 70 71 72 #define CE_STAT_DESC_TOEPLITZ_EN_OFFSET 0x00000000 73 #define CE_STAT_DESC_TOEPLITZ_EN_LSB 8 74 #define CE_STAT_DESC_TOEPLITZ_EN_MSB 8 75 #define CE_STAT_DESC_TOEPLITZ_EN_MASK 0x00000100 76 77 78 79 80 #define CE_STAT_DESC_SRC_SWAP_OFFSET 0x00000000 81 #define CE_STAT_DESC_SRC_SWAP_LSB 9 82 #define CE_STAT_DESC_SRC_SWAP_MSB 9 83 #define CE_STAT_DESC_SRC_SWAP_MASK 0x00000200 84 85 86 87 88 #define CE_STAT_DESC_DEST_SWAP_OFFSET 0x00000000 89 #define CE_STAT_DESC_DEST_SWAP_LSB 10 90 #define CE_STAT_DESC_DEST_SWAP_MSB 10 91 #define CE_STAT_DESC_DEST_SWAP_MASK 0x00000400 92 93 94 95 96 #define CE_STAT_DESC_GATHER_OFFSET 0x00000000 97 #define CE_STAT_DESC_GATHER_LSB 11 98 #define CE_STAT_DESC_GATHER_MSB 11 99 #define CE_STAT_DESC_GATHER_MASK 0x00000800 100 101 102 103 104 #define CE_STAT_DESC_BARRIER_READ_OFFSET 0x00000000 105 #define CE_STAT_DESC_BARRIER_READ_LSB 12 106 #define CE_STAT_DESC_BARRIER_READ_MSB 12 107 #define CE_STAT_DESC_BARRIER_READ_MASK 0x00001000 108 109 110 111 112 #define CE_STAT_DESC_CE_RES_6_OFFSET 0x00000000 113 #define CE_STAT_DESC_CE_RES_6_LSB 13 114 #define CE_STAT_DESC_CE_RES_6_MSB 15 115 #define CE_STAT_DESC_CE_RES_6_MASK 0x0000e000 116 117 118 119 120 #define CE_STAT_DESC_LENGTH_OFFSET 0x00000000 121 #define CE_STAT_DESC_LENGTH_LSB 16 122 #define CE_STAT_DESC_LENGTH_MSB 31 123 #define CE_STAT_DESC_LENGTH_MASK 0xffff0000 124 125 126 127 128 #define CE_STAT_DESC_TOEPLITZ_HASH_0_OFFSET 0x00000004 129 #define CE_STAT_DESC_TOEPLITZ_HASH_0_LSB 0 130 #define CE_STAT_DESC_TOEPLITZ_HASH_0_MSB 31 131 #define CE_STAT_DESC_TOEPLITZ_HASH_0_MASK 0xffffffff 132 133 134 135 136 #define CE_STAT_DESC_TOEPLITZ_HASH_1_OFFSET 0x00000008 137 #define CE_STAT_DESC_TOEPLITZ_HASH_1_LSB 0 138 #define CE_STAT_DESC_TOEPLITZ_HASH_1_MSB 31 139 #define CE_STAT_DESC_TOEPLITZ_HASH_1_MASK 0xffffffff 140 141 142 143 144 #define CE_STAT_DESC_FW_METADATA_OFFSET 0x0000000c 145 #define CE_STAT_DESC_FW_METADATA_LSB 0 146 #define CE_STAT_DESC_FW_METADATA_MSB 15 147 #define CE_STAT_DESC_FW_METADATA_MASK 0x0000ffff 148 149 150 151 152 #define CE_STAT_DESC_CE_RES_7_OFFSET 0x0000000c 153 #define CE_STAT_DESC_CE_RES_7_LSB 16 154 #define CE_STAT_DESC_CE_RES_7_MSB 19 155 #define CE_STAT_DESC_CE_RES_7_MASK 0x000f0000 156 157 158 159 160 #define CE_STAT_DESC_RING_ID_OFFSET 0x0000000c 161 #define CE_STAT_DESC_RING_ID_LSB 20 162 #define CE_STAT_DESC_RING_ID_MSB 27 163 #define CE_STAT_DESC_RING_ID_MASK 0x0ff00000 164 165 166 167 168 #define CE_STAT_DESC_LOOPING_COUNT_OFFSET 0x0000000c 169 #define CE_STAT_DESC_LOOPING_COUNT_LSB 28 170 #define CE_STAT_DESC_LOOPING_COUNT_MSB 31 171 #define CE_STAT_DESC_LOOPING_COUNT_MASK 0xf0000000 172 173 174 175 #endif 176