xref: /wlan-driver/fw-api/hw/qca6750/v1/reo_flush_queue_status.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020 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 //
20 // DO NOT EDIT!  This file is automatically generated
21 //               These definitions are tied to a particular hardware layout
22 
23 
24 #ifndef _REO_FLUSH_QUEUE_STATUS_H_
25 #define _REO_FLUSH_QUEUE_STATUS_H_
26 #if !defined(__ASSEMBLER__)
27 #endif
28 
29 #include "uniform_reo_status_header.h"
30 
31 // ################ START SUMMARY #################
32 //
33 //	Dword	Fields
34 //	0-1	struct uniform_reo_status_header status_header;
35 //	2	error_detected[0], reserved_2a[31:1]
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 //	9	reserved_9a[31:0]
43 //	10	reserved_10a[31:0]
44 //	11	reserved_11a[31:0]
45 //	12	reserved_12a[31:0]
46 //	13	reserved_13a[31:0]
47 //	14	reserved_14a[31:0]
48 //	15	reserved_15a[31:0]
49 //	16	reserved_16a[31:0]
50 //	17	reserved_17a[31:0]
51 //	18	reserved_18a[31:0]
52 //	19	reserved_19a[31:0]
53 //	20	reserved_20a[31:0]
54 //	21	reserved_21a[31:0]
55 //	22	reserved_22a[31:0]
56 //	23	reserved_23a[31:0]
57 //	24	reserved_24a[27:0], looping_count[31:28]
58 //
59 // ################ END SUMMARY #################
60 
61 #define NUM_OF_DWORDS_REO_FLUSH_QUEUE_STATUS 25
62 
63 struct reo_flush_queue_status {
64     struct            uniform_reo_status_header                       status_header;
65              uint32_t error_detected                  :  1, //[0]
66                       reserved_2a                     : 31; //[31:1]
67              uint32_t reserved_3a                     : 32; //[31:0]
68              uint32_t reserved_4a                     : 32; //[31:0]
69              uint32_t reserved_5a                     : 32; //[31:0]
70              uint32_t reserved_6a                     : 32; //[31:0]
71              uint32_t reserved_7a                     : 32; //[31:0]
72              uint32_t reserved_8a                     : 32; //[31:0]
73              uint32_t reserved_9a                     : 32; //[31:0]
74              uint32_t reserved_10a                    : 32; //[31:0]
75              uint32_t reserved_11a                    : 32; //[31:0]
76              uint32_t reserved_12a                    : 32; //[31:0]
77              uint32_t reserved_13a                    : 32; //[31:0]
78              uint32_t reserved_14a                    : 32; //[31:0]
79              uint32_t reserved_15a                    : 32; //[31:0]
80              uint32_t reserved_16a                    : 32; //[31:0]
81              uint32_t reserved_17a                    : 32; //[31:0]
82              uint32_t reserved_18a                    : 32; //[31:0]
83              uint32_t reserved_19a                    : 32; //[31:0]
84              uint32_t reserved_20a                    : 32; //[31:0]
85              uint32_t reserved_21a                    : 32; //[31:0]
86              uint32_t reserved_22a                    : 32; //[31:0]
87              uint32_t reserved_23a                    : 32; //[31:0]
88              uint32_t reserved_24a                    : 28, //[27:0]
89                       looping_count                   :  4; //[31:28]
90 };
91 
92 /*
93 
94 struct uniform_reo_status_header status_header
95 
96 			Consumer: SW
97 
98 			Producer: REO
99 
100 
101 
102 			Details that can link this status with the original
103 			command. It also contains info on how long REO took to
104 			execute this command.
105 
106 error_detected
107 
108 			Status of the blocking resource
109 
110 			0: No error has been detected while executing this
111 			command
112 
113 			1: Error detected: The resource to be used for blocking
114 			was already in use.
115 
116 reserved_2a
117 
118 			<legal 0>
119 
120 reserved_3a
121 
122 			<legal 0>
123 
124 reserved_4a
125 
126 			<legal 0>
127 
128 reserved_5a
129 
130 			<legal 0>
131 
132 reserved_6a
133 
134 			<legal 0>
135 
136 reserved_7a
137 
138 			<legal 0>
139 
140 reserved_8a
141 
142 			<legal 0>
143 
144 reserved_9a
145 
146 			<legal 0>
147 
148 reserved_10a
149 
150 			<legal 0>
151 
152 reserved_11a
153 
154 			<legal 0>
155 
156 reserved_12a
157 
158 			<legal 0>
159 
160 reserved_13a
161 
162 			<legal 0>
163 
164 reserved_14a
165 
166 			<legal 0>
167 
168 reserved_15a
169 
170 			<legal 0>
171 
172 reserved_16a
173 
174 			<legal 0>
175 
176 reserved_17a
177 
178 			<legal 0>
179 
180 reserved_18a
181 
182 			<legal 0>
183 
184 reserved_19a
185 
186 			<legal 0>
187 
188 reserved_20a
189 
190 			<legal 0>
191 
192 reserved_21a
193 
194 			<legal 0>
195 
196 reserved_22a
197 
198 			<legal 0>
199 
200 reserved_23a
201 
202 			<legal 0>
203 
204 reserved_24a
205 
206 			<legal 0>
207 
208 looping_count
209 
210 			A count value that indicates the number of times the
211 			producer of entries into this Ring has looped around the
212 			ring.
213 
214 			At initialization time, this value is set to 0. On the
215 			first loop, this value is set to 1. After the max value is
216 			reached allowed by the number of bits for this field, the
217 			count value continues with 0 again.
218 
219 
220 
221 			In case SW is the consumer of the ring entries, it can
222 			use this field to figure out up to where the producer of
223 			entries has created new entries. This eliminates the need to
224 			check where the head pointer' of the ring is located once
225 			the SW starts processing an interrupt indicating that new
226 			entries have been put into this ring...
227 
228 
229 
230 			Also note that SW if it wants only needs to look at the
231 			LSB bit of this count value.
232 
233 			<legal all>
234 */
235 
236 
237  /* EXTERNAL REFERENCE : struct uniform_reo_status_header status_header */
238 
239 
240 /* Description		REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_STATUS_NUMBER
241 
242 			Consumer: SW , DEBUG
243 
244 			Producer: REO
245 
246 
247 
248 			The value in this field is equal to value of the
249 			'REO_CMD_Number' field the REO command
250 
251 
252 
253 			This field helps to correlate the statuses with the REO
254 			commands.
255 
256 
257 
258 			<legal all>
259 */
260 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_STATUS_NUMBER_OFFSET 0x00000000
261 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_STATUS_NUMBER_LSB 0
262 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_STATUS_NUMBER_MASK 0x0000ffff
263 
264 /* Description		REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_CMD_EXECUTION_TIME
265 
266 			Consumer: DEBUG
267 
268 			Producer: REO
269 
270 
271 
272 			The amount of time REO took to excecute the command.
273 			Note that this time does not include the duration of the
274 			command waiting in the command ring, before the execution
275 			started.
276 
277 
278 
279 			In us.
280 
281 
282 
283 			<legal all>
284 */
285 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_CMD_EXECUTION_TIME_OFFSET 0x00000000
286 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_CMD_EXECUTION_TIME_LSB 16
287 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_CMD_EXECUTION_TIME_MASK 0x03ff0000
288 
289 /* Description		REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_CMD_EXECUTION_STATUS
290 
291 			Consumer: DEBUG
292 
293 			Producer: REO
294 
295 
296 
297 			Execution status of the command.
298 
299 
300 
301 			<enum 0 reo_successful_execution> Command has
302 			successfully be executed
303 
304 			<enum 1 reo_blocked_execution> Command could not be
305 			executed as the queue or cache was blocked
306 
307 			<enum 2 reo_failed_execution> Command has encountered
308 			problems when executing, like the queue descriptor not being
309 			valid. None of the status fields in the entire STATUS TLV
310 			are valid.
311 
312 			<enum 3 reo_resource_blocked> Command is NOT  executed
313 			because one or more descriptors were blocked. This is SW
314 			programming mistake.
315 
316 			None of the status fields in the entire STATUS TLV are
317 			valid.
318 
319 
320 
321 			<legal  0-3>
322 */
323 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_OFFSET 0x00000000
324 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_LSB 26
325 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MASK 0x0c000000
326 
327 /* Description		REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_RESERVED_0A
328 
329 			<legal 0>
330 */
331 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_RESERVED_0A_OFFSET    0x00000000
332 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_RESERVED_0A_LSB       28
333 #define REO_FLUSH_QUEUE_STATUS_0_STATUS_HEADER_RESERVED_0A_MASK      0xf0000000
334 
335 /* Description		REO_FLUSH_QUEUE_STATUS_1_STATUS_HEADER_TIMESTAMP
336 
337 			Timestamp at the moment that this status report is
338 			written.
339 
340 
341 
342 			<legal all>
343 */
344 #define REO_FLUSH_QUEUE_STATUS_1_STATUS_HEADER_TIMESTAMP_OFFSET      0x00000004
345 #define REO_FLUSH_QUEUE_STATUS_1_STATUS_HEADER_TIMESTAMP_LSB         0
346 #define REO_FLUSH_QUEUE_STATUS_1_STATUS_HEADER_TIMESTAMP_MASK        0xffffffff
347 
348 /* Description		REO_FLUSH_QUEUE_STATUS_2_ERROR_DETECTED
349 
350 			Status of the blocking resource
351 
352 			0: No error has been detected while executing this
353 			command
354 
355 			1: Error detected: The resource to be used for blocking
356 			was already in use.
357 */
358 #define REO_FLUSH_QUEUE_STATUS_2_ERROR_DETECTED_OFFSET               0x00000008
359 #define REO_FLUSH_QUEUE_STATUS_2_ERROR_DETECTED_LSB                  0
360 #define REO_FLUSH_QUEUE_STATUS_2_ERROR_DETECTED_MASK                 0x00000001
361 
362 /* Description		REO_FLUSH_QUEUE_STATUS_2_RESERVED_2A
363 
364 			<legal 0>
365 */
366 #define REO_FLUSH_QUEUE_STATUS_2_RESERVED_2A_OFFSET                  0x00000008
367 #define REO_FLUSH_QUEUE_STATUS_2_RESERVED_2A_LSB                     1
368 #define REO_FLUSH_QUEUE_STATUS_2_RESERVED_2A_MASK                    0xfffffffe
369 
370 /* Description		REO_FLUSH_QUEUE_STATUS_3_RESERVED_3A
371 
372 			<legal 0>
373 */
374 #define REO_FLUSH_QUEUE_STATUS_3_RESERVED_3A_OFFSET                  0x0000000c
375 #define REO_FLUSH_QUEUE_STATUS_3_RESERVED_3A_LSB                     0
376 #define REO_FLUSH_QUEUE_STATUS_3_RESERVED_3A_MASK                    0xffffffff
377 
378 /* Description		REO_FLUSH_QUEUE_STATUS_4_RESERVED_4A
379 
380 			<legal 0>
381 */
382 #define REO_FLUSH_QUEUE_STATUS_4_RESERVED_4A_OFFSET                  0x00000010
383 #define REO_FLUSH_QUEUE_STATUS_4_RESERVED_4A_LSB                     0
384 #define REO_FLUSH_QUEUE_STATUS_4_RESERVED_4A_MASK                    0xffffffff
385 
386 /* Description		REO_FLUSH_QUEUE_STATUS_5_RESERVED_5A
387 
388 			<legal 0>
389 */
390 #define REO_FLUSH_QUEUE_STATUS_5_RESERVED_5A_OFFSET                  0x00000014
391 #define REO_FLUSH_QUEUE_STATUS_5_RESERVED_5A_LSB                     0
392 #define REO_FLUSH_QUEUE_STATUS_5_RESERVED_5A_MASK                    0xffffffff
393 
394 /* Description		REO_FLUSH_QUEUE_STATUS_6_RESERVED_6A
395 
396 			<legal 0>
397 */
398 #define REO_FLUSH_QUEUE_STATUS_6_RESERVED_6A_OFFSET                  0x00000018
399 #define REO_FLUSH_QUEUE_STATUS_6_RESERVED_6A_LSB                     0
400 #define REO_FLUSH_QUEUE_STATUS_6_RESERVED_6A_MASK                    0xffffffff
401 
402 /* Description		REO_FLUSH_QUEUE_STATUS_7_RESERVED_7A
403 
404 			<legal 0>
405 */
406 #define REO_FLUSH_QUEUE_STATUS_7_RESERVED_7A_OFFSET                  0x0000001c
407 #define REO_FLUSH_QUEUE_STATUS_7_RESERVED_7A_LSB                     0
408 #define REO_FLUSH_QUEUE_STATUS_7_RESERVED_7A_MASK                    0xffffffff
409 
410 /* Description		REO_FLUSH_QUEUE_STATUS_8_RESERVED_8A
411 
412 			<legal 0>
413 */
414 #define REO_FLUSH_QUEUE_STATUS_8_RESERVED_8A_OFFSET                  0x00000020
415 #define REO_FLUSH_QUEUE_STATUS_8_RESERVED_8A_LSB                     0
416 #define REO_FLUSH_QUEUE_STATUS_8_RESERVED_8A_MASK                    0xffffffff
417 
418 /* Description		REO_FLUSH_QUEUE_STATUS_9_RESERVED_9A
419 
420 			<legal 0>
421 */
422 #define REO_FLUSH_QUEUE_STATUS_9_RESERVED_9A_OFFSET                  0x00000024
423 #define REO_FLUSH_QUEUE_STATUS_9_RESERVED_9A_LSB                     0
424 #define REO_FLUSH_QUEUE_STATUS_9_RESERVED_9A_MASK                    0xffffffff
425 
426 /* Description		REO_FLUSH_QUEUE_STATUS_10_RESERVED_10A
427 
428 			<legal 0>
429 */
430 #define REO_FLUSH_QUEUE_STATUS_10_RESERVED_10A_OFFSET                0x00000028
431 #define REO_FLUSH_QUEUE_STATUS_10_RESERVED_10A_LSB                   0
432 #define REO_FLUSH_QUEUE_STATUS_10_RESERVED_10A_MASK                  0xffffffff
433 
434 /* Description		REO_FLUSH_QUEUE_STATUS_11_RESERVED_11A
435 
436 			<legal 0>
437 */
438 #define REO_FLUSH_QUEUE_STATUS_11_RESERVED_11A_OFFSET                0x0000002c
439 #define REO_FLUSH_QUEUE_STATUS_11_RESERVED_11A_LSB                   0
440 #define REO_FLUSH_QUEUE_STATUS_11_RESERVED_11A_MASK                  0xffffffff
441 
442 /* Description		REO_FLUSH_QUEUE_STATUS_12_RESERVED_12A
443 
444 			<legal 0>
445 */
446 #define REO_FLUSH_QUEUE_STATUS_12_RESERVED_12A_OFFSET                0x00000030
447 #define REO_FLUSH_QUEUE_STATUS_12_RESERVED_12A_LSB                   0
448 #define REO_FLUSH_QUEUE_STATUS_12_RESERVED_12A_MASK                  0xffffffff
449 
450 /* Description		REO_FLUSH_QUEUE_STATUS_13_RESERVED_13A
451 
452 			<legal 0>
453 */
454 #define REO_FLUSH_QUEUE_STATUS_13_RESERVED_13A_OFFSET                0x00000034
455 #define REO_FLUSH_QUEUE_STATUS_13_RESERVED_13A_LSB                   0
456 #define REO_FLUSH_QUEUE_STATUS_13_RESERVED_13A_MASK                  0xffffffff
457 
458 /* Description		REO_FLUSH_QUEUE_STATUS_14_RESERVED_14A
459 
460 			<legal 0>
461 */
462 #define REO_FLUSH_QUEUE_STATUS_14_RESERVED_14A_OFFSET                0x00000038
463 #define REO_FLUSH_QUEUE_STATUS_14_RESERVED_14A_LSB                   0
464 #define REO_FLUSH_QUEUE_STATUS_14_RESERVED_14A_MASK                  0xffffffff
465 
466 /* Description		REO_FLUSH_QUEUE_STATUS_15_RESERVED_15A
467 
468 			<legal 0>
469 */
470 #define REO_FLUSH_QUEUE_STATUS_15_RESERVED_15A_OFFSET                0x0000003c
471 #define REO_FLUSH_QUEUE_STATUS_15_RESERVED_15A_LSB                   0
472 #define REO_FLUSH_QUEUE_STATUS_15_RESERVED_15A_MASK                  0xffffffff
473 
474 /* Description		REO_FLUSH_QUEUE_STATUS_16_RESERVED_16A
475 
476 			<legal 0>
477 */
478 #define REO_FLUSH_QUEUE_STATUS_16_RESERVED_16A_OFFSET                0x00000040
479 #define REO_FLUSH_QUEUE_STATUS_16_RESERVED_16A_LSB                   0
480 #define REO_FLUSH_QUEUE_STATUS_16_RESERVED_16A_MASK                  0xffffffff
481 
482 /* Description		REO_FLUSH_QUEUE_STATUS_17_RESERVED_17A
483 
484 			<legal 0>
485 */
486 #define REO_FLUSH_QUEUE_STATUS_17_RESERVED_17A_OFFSET                0x00000044
487 #define REO_FLUSH_QUEUE_STATUS_17_RESERVED_17A_LSB                   0
488 #define REO_FLUSH_QUEUE_STATUS_17_RESERVED_17A_MASK                  0xffffffff
489 
490 /* Description		REO_FLUSH_QUEUE_STATUS_18_RESERVED_18A
491 
492 			<legal 0>
493 */
494 #define REO_FLUSH_QUEUE_STATUS_18_RESERVED_18A_OFFSET                0x00000048
495 #define REO_FLUSH_QUEUE_STATUS_18_RESERVED_18A_LSB                   0
496 #define REO_FLUSH_QUEUE_STATUS_18_RESERVED_18A_MASK                  0xffffffff
497 
498 /* Description		REO_FLUSH_QUEUE_STATUS_19_RESERVED_19A
499 
500 			<legal 0>
501 */
502 #define REO_FLUSH_QUEUE_STATUS_19_RESERVED_19A_OFFSET                0x0000004c
503 #define REO_FLUSH_QUEUE_STATUS_19_RESERVED_19A_LSB                   0
504 #define REO_FLUSH_QUEUE_STATUS_19_RESERVED_19A_MASK                  0xffffffff
505 
506 /* Description		REO_FLUSH_QUEUE_STATUS_20_RESERVED_20A
507 
508 			<legal 0>
509 */
510 #define REO_FLUSH_QUEUE_STATUS_20_RESERVED_20A_OFFSET                0x00000050
511 #define REO_FLUSH_QUEUE_STATUS_20_RESERVED_20A_LSB                   0
512 #define REO_FLUSH_QUEUE_STATUS_20_RESERVED_20A_MASK                  0xffffffff
513 
514 /* Description		REO_FLUSH_QUEUE_STATUS_21_RESERVED_21A
515 
516 			<legal 0>
517 */
518 #define REO_FLUSH_QUEUE_STATUS_21_RESERVED_21A_OFFSET                0x00000054
519 #define REO_FLUSH_QUEUE_STATUS_21_RESERVED_21A_LSB                   0
520 #define REO_FLUSH_QUEUE_STATUS_21_RESERVED_21A_MASK                  0xffffffff
521 
522 /* Description		REO_FLUSH_QUEUE_STATUS_22_RESERVED_22A
523 
524 			<legal 0>
525 */
526 #define REO_FLUSH_QUEUE_STATUS_22_RESERVED_22A_OFFSET                0x00000058
527 #define REO_FLUSH_QUEUE_STATUS_22_RESERVED_22A_LSB                   0
528 #define REO_FLUSH_QUEUE_STATUS_22_RESERVED_22A_MASK                  0xffffffff
529 
530 /* Description		REO_FLUSH_QUEUE_STATUS_23_RESERVED_23A
531 
532 			<legal 0>
533 */
534 #define REO_FLUSH_QUEUE_STATUS_23_RESERVED_23A_OFFSET                0x0000005c
535 #define REO_FLUSH_QUEUE_STATUS_23_RESERVED_23A_LSB                   0
536 #define REO_FLUSH_QUEUE_STATUS_23_RESERVED_23A_MASK                  0xffffffff
537 
538 /* Description		REO_FLUSH_QUEUE_STATUS_24_RESERVED_24A
539 
540 			<legal 0>
541 */
542 #define REO_FLUSH_QUEUE_STATUS_24_RESERVED_24A_OFFSET                0x00000060
543 #define REO_FLUSH_QUEUE_STATUS_24_RESERVED_24A_LSB                   0
544 #define REO_FLUSH_QUEUE_STATUS_24_RESERVED_24A_MASK                  0x0fffffff
545 
546 /* Description		REO_FLUSH_QUEUE_STATUS_24_LOOPING_COUNT
547 
548 			A count value that indicates the number of times the
549 			producer of entries into this Ring has looped around the
550 			ring.
551 
552 			At initialization time, this value is set to 0. On the
553 			first loop, this value is set to 1. After the max value is
554 			reached allowed by the number of bits for this field, the
555 			count value continues with 0 again.
556 
557 
558 
559 			In case SW is the consumer of the ring entries, it can
560 			use this field to figure out up to where the producer of
561 			entries has created new entries. This eliminates the need to
562 			check where the head pointer' of the ring is located once
563 			the SW starts processing an interrupt indicating that new
564 			entries have been put into this ring...
565 
566 
567 
568 			Also note that SW if it wants only needs to look at the
569 			LSB bit of this count value.
570 
571 			<legal all>
572 */
573 #define REO_FLUSH_QUEUE_STATUS_24_LOOPING_COUNT_OFFSET               0x00000060
574 #define REO_FLUSH_QUEUE_STATUS_24_LOOPING_COUNT_LSB                  28
575 #define REO_FLUSH_QUEUE_STATUS_24_LOOPING_COUNT_MASK                 0xf0000000
576 
577 
578 #endif // _REO_FLUSH_QUEUE_STATUS_H_
579