xref: /wlan-driver/fw-api/hw/qca5332/uniform_reo_status_header.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name 
2*5113495bSYour Name /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
5*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
6*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
7*5113495bSYour Name  *
8*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*5113495bSYour Name  */
16*5113495bSYour Name 
17*5113495bSYour Name 
18*5113495bSYour Name 
19*5113495bSYour Name 
20*5113495bSYour Name 
21*5113495bSYour Name 
22*5113495bSYour Name 
23*5113495bSYour Name 
24*5113495bSYour Name 
25*5113495bSYour Name 
26*5113495bSYour Name #ifndef _UNIFORM_REO_STATUS_HEADER_H_
27*5113495bSYour Name #define _UNIFORM_REO_STATUS_HEADER_H_
28*5113495bSYour Name #if !defined(__ASSEMBLER__)
29*5113495bSYour Name #endif
30*5113495bSYour Name 
31*5113495bSYour Name #define NUM_OF_DWORDS_UNIFORM_REO_STATUS_HEADER 2
32*5113495bSYour Name 
33*5113495bSYour Name 
34*5113495bSYour Name struct uniform_reo_status_header {
35*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36*5113495bSYour Name              uint32_t reo_status_number                                       : 16, // [15:0]
37*5113495bSYour Name                       cmd_execution_time                                      : 10, // [25:16]
38*5113495bSYour Name                       reo_cmd_execution_status                                :  2, // [27:26]
39*5113495bSYour Name                       reserved_0a                                             :  4; // [31:28]
40*5113495bSYour Name              uint32_t timestamp                                               : 32; // [31:0]
41*5113495bSYour Name #else
42*5113495bSYour Name              uint32_t reserved_0a                                             :  4, // [31:28]
43*5113495bSYour Name                       reo_cmd_execution_status                                :  2, // [27:26]
44*5113495bSYour Name                       cmd_execution_time                                      : 10, // [25:16]
45*5113495bSYour Name                       reo_status_number                                       : 16; // [15:0]
46*5113495bSYour Name              uint32_t timestamp                                               : 32; // [31:0]
47*5113495bSYour Name #endif
48*5113495bSYour Name };
49*5113495bSYour Name 
50*5113495bSYour Name 
51*5113495bSYour Name /* Description		REO_STATUS_NUMBER
52*5113495bSYour Name 
53*5113495bSYour Name 			Consumer: SW , DEBUG
54*5113495bSYour Name 			Producer: REO
55*5113495bSYour Name 
56*5113495bSYour Name 			The value in this field is equal to value of the 'REO_CMD_Number'
57*5113495bSYour Name 			field the REO command
58*5113495bSYour Name 
59*5113495bSYour Name 			This field helps to correlate the statuses with the REO
60*5113495bSYour Name 			commands.
61*5113495bSYour Name 
62*5113495bSYour Name 			<legal all>
63*5113495bSYour Name */
64*5113495bSYour Name 
65*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_OFFSET                          0x00000000
66*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_LSB                             0
67*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_MSB                             15
68*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_REO_STATUS_NUMBER_MASK                            0x0000ffff
69*5113495bSYour Name 
70*5113495bSYour Name 
71*5113495bSYour Name /* Description		CMD_EXECUTION_TIME
72*5113495bSYour Name 
73*5113495bSYour Name 			Consumer: DEBUG
74*5113495bSYour Name 			Producer: REO
75*5113495bSYour Name 
76*5113495bSYour Name 			The amount of time REO took to excecute the command. Note
77*5113495bSYour Name 			 that this time does not include the duration of the command
78*5113495bSYour Name 			 waiting in the command ring, before the execution started.
79*5113495bSYour Name 
80*5113495bSYour Name 
81*5113495bSYour Name 			In us.
82*5113495bSYour Name 
83*5113495bSYour Name 			<legal all>
84*5113495bSYour Name */
85*5113495bSYour Name 
86*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_OFFSET                         0x00000000
87*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_LSB                            16
88*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_MSB                            25
89*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_CMD_EXECUTION_TIME_MASK                           0x03ff0000
90*5113495bSYour Name 
91*5113495bSYour Name 
92*5113495bSYour Name /* Description		REO_CMD_EXECUTION_STATUS
93*5113495bSYour Name 
94*5113495bSYour Name 			Consumer: DEBUG
95*5113495bSYour Name 			Producer: REO
96*5113495bSYour Name 
97*5113495bSYour Name 			Execution status of the command.
98*5113495bSYour Name 
99*5113495bSYour Name 			<enum 0 reo_successful_execution> Command has successfully
100*5113495bSYour Name 			 be executed
101*5113495bSYour Name 			<enum 1 reo_blocked_execution> Command could not be executed
102*5113495bSYour Name 			 as the queue or cache was blocked
103*5113495bSYour Name 			<enum 2 reo_failed_execution> Command has encountered problems
104*5113495bSYour Name 			 when executing, like the queue descriptor not being valid.
105*5113495bSYour Name 			None of the status fields in the entire STATUS TLV are valid.
106*5113495bSYour Name 
107*5113495bSYour Name 			<enum 3 reo_resource_blocked> Command is NOT  executed because
108*5113495bSYour Name 			 one or more descriptors were blocked. This is SW programming
109*5113495bSYour Name 			 mistake.
110*5113495bSYour Name 			None of the status fields in the entire STATUS TLV are valid.
111*5113495bSYour Name 
112*5113495bSYour Name 
113*5113495bSYour Name 			<legal  0-3>
114*5113495bSYour Name */
115*5113495bSYour Name 
116*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_OFFSET                   0x00000000
117*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_LSB                      26
118*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MSB                      27
119*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MASK                     0x0c000000
120*5113495bSYour Name 
121*5113495bSYour Name 
122*5113495bSYour Name /* Description		RESERVED_0A
123*5113495bSYour Name 
124*5113495bSYour Name 			<legal 0>
125*5113495bSYour Name */
126*5113495bSYour Name 
127*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_OFFSET                                0x00000000
128*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_LSB                                   28
129*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_MSB                                   31
130*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_RESERVED_0A_MASK                                  0xf0000000
131*5113495bSYour Name 
132*5113495bSYour Name 
133*5113495bSYour Name /* Description		TIMESTAMP
134*5113495bSYour Name 
135*5113495bSYour Name 			Timestamp at the moment that this status report is written.
136*5113495bSYour Name 
137*5113495bSYour Name 
138*5113495bSYour Name 			<legal all>
139*5113495bSYour Name */
140*5113495bSYour Name 
141*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_OFFSET                                  0x00000004
142*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_LSB                                     0
143*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_MSB                                     31
144*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_TIMESTAMP_MASK                                    0xffffffff
145*5113495bSYour Name 
146*5113495bSYour Name 
147*5113495bSYour Name 
148*5113495bSYour Name #endif   // UNIFORM_REO_STATUS_HEADER
149