1 /* 2 * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef _REO_FLUSH_TIMEOUT_LIST_H_ 20 #define _REO_FLUSH_TIMEOUT_LIST_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 #include "uniform_reo_cmd_header.h" 25 26 // ################ START SUMMARY ################# 27 // 28 // Dword Fields 29 // 0 struct uniform_reo_cmd_header cmd_header; 30 // 1 ac_timout_list[1:0], reserved_1[31:2] 31 // 2 minimum_release_desc_count[15:0], minimum_forward_buf_count[31:16] 32 // 3 reserved_3a[31:0] 33 // 4 reserved_4a[31:0] 34 // 5 reserved_5a[31:0] 35 // 6 reserved_6a[31:0] 36 // 7 reserved_7a[31:0] 37 // 8 reserved_8a[31:0] 38 // 39 // ################ END SUMMARY ################# 40 41 #define NUM_OF_DWORDS_REO_FLUSH_TIMEOUT_LIST 9 42 43 struct reo_flush_timeout_list { 44 struct uniform_reo_cmd_header cmd_header; 45 uint32_t ac_timout_list : 2, //[1:0] 46 reserved_1 : 30; //[31:2] 47 uint32_t minimum_release_desc_count : 16, //[15:0] 48 minimum_forward_buf_count : 16; //[31:16] 49 uint32_t reserved_3a : 32; //[31:0] 50 uint32_t reserved_4a : 32; //[31:0] 51 uint32_t reserved_5a : 32; //[31:0] 52 uint32_t reserved_6a : 32; //[31:0] 53 uint32_t reserved_7a : 32; //[31:0] 54 uint32_t reserved_8a : 32; //[31:0] 55 }; 56 57 /* 58 59 struct uniform_reo_cmd_header cmd_header 60 61 Consumer: REO 62 63 Producer: SW 64 65 66 67 Details for command execution tracking purposes. 68 69 ac_timout_list 70 71 Consumer: REO 72 73 Producer: SW 74 75 76 77 The AC_timeout list to be used for this command 78 79 <legal all> 80 81 reserved_1 82 83 <legal 0> 84 85 minimum_release_desc_count 86 87 Consumer: REO 88 89 Producer: SW 90 91 92 93 The minimum number of link descriptors requested to be 94 released. If set to 0, only buffer release counts seems to 95 be important... When set to very high value, likely the 96 entire timeout list will be exhausted before this count is 97 reached or maybe this count will not get reached. REO 98 however will stop here as it can not do anything else. 99 100 101 102 When both this field and field Minimum_forward_buf_count 103 are > 0, REO needs to meet both requirements. When both 104 entries are 0 (which should be a programming error), REO 105 does not need to do anything. 106 107 108 109 Note that this includes counts of MPDU link Desc as well 110 as MSDU link Desc. Where the count of MSDU link Desc is not 111 known to REO it's approximated by deriving from MSDU count 112 113 <legal all> 114 115 minimum_forward_buf_count 116 117 Consumer: REO 118 119 Producer: SW 120 121 122 123 The minimum number of buffer descriptors requested to be 124 passed on to the REO destination rings. 125 126 127 128 If set to 0, only descriptor release counts seems to be 129 important... 130 131 132 133 When set to very high value, likely the entire timeout 134 list will be exhausted before this count is reached or maybe 135 this count will not get reached. REO however will stop here 136 as it can not do anything else. 137 138 139 140 Note that REO does not know the exact buffer count. This 141 can be approximated by using the MSDU_COUNT 142 143 <legal all> 144 145 reserved_3a 146 147 <legal 0> 148 149 reserved_4a 150 151 <legal 0> 152 153 reserved_5a 154 155 <legal 0> 156 157 reserved_6a 158 159 <legal 0> 160 161 reserved_7a 162 163 <legal 0> 164 165 reserved_8a 166 167 <legal 0> 168 */ 169 170 #define REO_FLUSH_TIMEOUT_LIST_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_OFFSET 0x00000000 171 #define REO_FLUSH_TIMEOUT_LIST_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_LSB 0 172 #define REO_FLUSH_TIMEOUT_LIST_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_MASK 0xffffffff 173 174 /* Description REO_FLUSH_TIMEOUT_LIST_1_AC_TIMOUT_LIST 175 176 Consumer: REO 177 178 Producer: SW 179 180 181 182 The AC_timeout list to be used for this command 183 184 <legal all> 185 */ 186 #define REO_FLUSH_TIMEOUT_LIST_1_AC_TIMOUT_LIST_OFFSET 0x00000004 187 #define REO_FLUSH_TIMEOUT_LIST_1_AC_TIMOUT_LIST_LSB 0 188 #define REO_FLUSH_TIMEOUT_LIST_1_AC_TIMOUT_LIST_MASK 0x00000003 189 190 /* Description REO_FLUSH_TIMEOUT_LIST_1_RESERVED_1 191 192 <legal 0> 193 */ 194 #define REO_FLUSH_TIMEOUT_LIST_1_RESERVED_1_OFFSET 0x00000004 195 #define REO_FLUSH_TIMEOUT_LIST_1_RESERVED_1_LSB 2 196 #define REO_FLUSH_TIMEOUT_LIST_1_RESERVED_1_MASK 0xfffffffc 197 198 /* Description REO_FLUSH_TIMEOUT_LIST_2_MINIMUM_RELEASE_DESC_COUNT 199 200 Consumer: REO 201 202 Producer: SW 203 204 205 206 The minimum number of link descriptors requested to be 207 released. If set to 0, only buffer release counts seems to 208 be important... When set to very high value, likely the 209 entire timeout list will be exhausted before this count is 210 reached or maybe this count will not get reached. REO 211 however will stop here as it can not do anything else. 212 213 214 215 When both this field and field Minimum_forward_buf_count 216 are > 0, REO needs to meet both requirements. When both 217 entries are 0 (which should be a programming error), REO 218 does not need to do anything. 219 220 221 222 Note that this includes counts of MPDU link Desc as well 223 as MSDU link Desc. Where the count of MSDU link Desc is not 224 known to REO it's approximated by deriving from MSDU count 225 226 <legal all> 227 */ 228 #define REO_FLUSH_TIMEOUT_LIST_2_MINIMUM_RELEASE_DESC_COUNT_OFFSET 0x00000008 229 #define REO_FLUSH_TIMEOUT_LIST_2_MINIMUM_RELEASE_DESC_COUNT_LSB 0 230 #define REO_FLUSH_TIMEOUT_LIST_2_MINIMUM_RELEASE_DESC_COUNT_MASK 0x0000ffff 231 232 /* Description REO_FLUSH_TIMEOUT_LIST_2_MINIMUM_FORWARD_BUF_COUNT 233 234 Consumer: REO 235 236 Producer: SW 237 238 239 240 The minimum number of buffer descriptors requested to be 241 passed on to the REO destination rings. 242 243 244 245 If set to 0, only descriptor release counts seems to be 246 important... 247 248 249 250 When set to very high value, likely the entire timeout 251 list will be exhausted before this count is reached or maybe 252 this count will not get reached. REO however will stop here 253 as it can not do anything else. 254 255 256 257 Note that REO does not know the exact buffer count. This 258 can be approximated by using the MSDU_COUNT 259 260 <legal all> 261 */ 262 #define REO_FLUSH_TIMEOUT_LIST_2_MINIMUM_FORWARD_BUF_COUNT_OFFSET 0x00000008 263 #define REO_FLUSH_TIMEOUT_LIST_2_MINIMUM_FORWARD_BUF_COUNT_LSB 16 264 #define REO_FLUSH_TIMEOUT_LIST_2_MINIMUM_FORWARD_BUF_COUNT_MASK 0xffff0000 265 266 /* Description REO_FLUSH_TIMEOUT_LIST_3_RESERVED_3A 267 268 <legal 0> 269 */ 270 #define REO_FLUSH_TIMEOUT_LIST_3_RESERVED_3A_OFFSET 0x0000000c 271 #define REO_FLUSH_TIMEOUT_LIST_3_RESERVED_3A_LSB 0 272 #define REO_FLUSH_TIMEOUT_LIST_3_RESERVED_3A_MASK 0xffffffff 273 274 /* Description REO_FLUSH_TIMEOUT_LIST_4_RESERVED_4A 275 276 <legal 0> 277 */ 278 #define REO_FLUSH_TIMEOUT_LIST_4_RESERVED_4A_OFFSET 0x00000010 279 #define REO_FLUSH_TIMEOUT_LIST_4_RESERVED_4A_LSB 0 280 #define REO_FLUSH_TIMEOUT_LIST_4_RESERVED_4A_MASK 0xffffffff 281 282 /* Description REO_FLUSH_TIMEOUT_LIST_5_RESERVED_5A 283 284 <legal 0> 285 */ 286 #define REO_FLUSH_TIMEOUT_LIST_5_RESERVED_5A_OFFSET 0x00000014 287 #define REO_FLUSH_TIMEOUT_LIST_5_RESERVED_5A_LSB 0 288 #define REO_FLUSH_TIMEOUT_LIST_5_RESERVED_5A_MASK 0xffffffff 289 290 /* Description REO_FLUSH_TIMEOUT_LIST_6_RESERVED_6A 291 292 <legal 0> 293 */ 294 #define REO_FLUSH_TIMEOUT_LIST_6_RESERVED_6A_OFFSET 0x00000018 295 #define REO_FLUSH_TIMEOUT_LIST_6_RESERVED_6A_LSB 0 296 #define REO_FLUSH_TIMEOUT_LIST_6_RESERVED_6A_MASK 0xffffffff 297 298 /* Description REO_FLUSH_TIMEOUT_LIST_7_RESERVED_7A 299 300 <legal 0> 301 */ 302 #define REO_FLUSH_TIMEOUT_LIST_7_RESERVED_7A_OFFSET 0x0000001c 303 #define REO_FLUSH_TIMEOUT_LIST_7_RESERVED_7A_LSB 0 304 #define REO_FLUSH_TIMEOUT_LIST_7_RESERVED_7A_MASK 0xffffffff 305 306 /* Description REO_FLUSH_TIMEOUT_LIST_8_RESERVED_8A 307 308 <legal 0> 309 */ 310 #define REO_FLUSH_TIMEOUT_LIST_8_RESERVED_8A_OFFSET 0x00000020 311 #define REO_FLUSH_TIMEOUT_LIST_8_RESERVED_8A_LSB 0 312 #define REO_FLUSH_TIMEOUT_LIST_8_RESERVED_8A_MASK 0xffffffff 313 314 315 #endif // _REO_FLUSH_TIMEOUT_LIST_H_ 316