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