xref: /wlan-driver/fw-api/hw/qca6290/11ax/v1/uniform_reo_status_header.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
5*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
6*5113495bSYour Name  * above copyright notice and this permission notice appear in all
7*5113495bSYour Name  * copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
17*5113495bSYour Name  */
18*5113495bSYour Name 
19*5113495bSYour Name #ifndef _UNIFORM_REO_STATUS_HEADER_H_
20*5113495bSYour Name #define _UNIFORM_REO_STATUS_HEADER_H_
21*5113495bSYour Name #if !defined(__ASSEMBLER__)
22*5113495bSYour Name #endif
23*5113495bSYour Name 
24*5113495bSYour Name 
25*5113495bSYour Name // ################ START SUMMARY #################
26*5113495bSYour Name //
27*5113495bSYour Name //	Dword	Fields
28*5113495bSYour Name //	0	reo_status_number[15:0], cmd_execution_time[25:16], reo_cmd_execution_status[27:26], reserved_0a[31:28]
29*5113495bSYour Name //	1	timestamp[31:0]
30*5113495bSYour Name //
31*5113495bSYour Name // ################ END SUMMARY #################
32*5113495bSYour Name 
33*5113495bSYour Name #define NUM_OF_DWORDS_UNIFORM_REO_STATUS_HEADER 2
34*5113495bSYour Name 
35*5113495bSYour Name struct uniform_reo_status_header {
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 };
42*5113495bSYour Name 
43*5113495bSYour Name /*
44*5113495bSYour Name 
45*5113495bSYour Name reo_status_number
46*5113495bSYour Name 
47*5113495bSYour Name 			Consumer: SW , DEBUG
48*5113495bSYour Name 
49*5113495bSYour Name 			Producer: REO
50*5113495bSYour Name 
51*5113495bSYour Name 
52*5113495bSYour Name 
53*5113495bSYour Name 			The value in this field is equal to value of the
54*5113495bSYour Name 			'REO_CMD_Number' field the REO command
55*5113495bSYour Name 
56*5113495bSYour Name 
57*5113495bSYour Name 
58*5113495bSYour Name 			This field helps to correlate the statuses with the REO
59*5113495bSYour Name 			commands.
60*5113495bSYour Name 
61*5113495bSYour Name 
62*5113495bSYour Name 
63*5113495bSYour Name 			<legal all>
64*5113495bSYour Name 
65*5113495bSYour Name cmd_execution_time
66*5113495bSYour Name 
67*5113495bSYour Name 			Consumer: DEBUG
68*5113495bSYour Name 
69*5113495bSYour Name 			Producer: REO
70*5113495bSYour Name 
71*5113495bSYour Name 
72*5113495bSYour Name 
73*5113495bSYour Name 			The amount of time REO took to excecute the command.
74*5113495bSYour Name 			Note that this time does not include the duration of the
75*5113495bSYour Name 			command waiting in the command ring, before the execution
76*5113495bSYour Name 			started.
77*5113495bSYour Name 
78*5113495bSYour Name 
79*5113495bSYour Name 
80*5113495bSYour Name 			In us.
81*5113495bSYour Name 
82*5113495bSYour Name 
83*5113495bSYour Name 
84*5113495bSYour Name 			<legal all>
85*5113495bSYour Name 
86*5113495bSYour Name reo_cmd_execution_status
87*5113495bSYour Name 
88*5113495bSYour Name 			Consumer: DEBUG
89*5113495bSYour Name 
90*5113495bSYour Name 			Producer: REO
91*5113495bSYour Name 
92*5113495bSYour Name 
93*5113495bSYour Name 
94*5113495bSYour Name 			Execution status of the command.
95*5113495bSYour Name 
96*5113495bSYour Name 
97*5113495bSYour Name 
98*5113495bSYour Name 			<enum 0 reo_successful_execution> Command has
99*5113495bSYour Name 			successfully be executed
100*5113495bSYour Name 
101*5113495bSYour Name 			<enum 1 reo_blocked_execution> Command could not be
102*5113495bSYour Name 			executed as the queue or cache was blocked
103*5113495bSYour Name 
104*5113495bSYour Name 			<enum 2 reo_failed_execution> Command has encountered
105*5113495bSYour Name 			problems when executing, like the queue descriptor not being
106*5113495bSYour Name 			valid. None of the status fields in the entire STATUS TLV
107*5113495bSYour Name 			are valid.
108*5113495bSYour Name 
109*5113495bSYour Name 			<enum 3 reo_resource_blocked> Command is NOT  executed
110*5113495bSYour Name 			because one or more descriptors were blocked. This is SW
111*5113495bSYour Name 			programming mistake.
112*5113495bSYour Name 
113*5113495bSYour Name 			None of the status fields in the entire STATUS TLV are
114*5113495bSYour Name 			valid.
115*5113495bSYour Name 
116*5113495bSYour Name 
117*5113495bSYour Name 
118*5113495bSYour Name 			<legal  0-3>
119*5113495bSYour Name 
120*5113495bSYour Name reserved_0a
121*5113495bSYour Name 
122*5113495bSYour Name 			<legal 0>
123*5113495bSYour Name 
124*5113495bSYour Name timestamp
125*5113495bSYour Name 
126*5113495bSYour Name 			Timestamp at the moment that this status report is
127*5113495bSYour Name 			written.
128*5113495bSYour Name 
129*5113495bSYour Name 
130*5113495bSYour Name 
131*5113495bSYour Name 			<legal all>
132*5113495bSYour Name */
133*5113495bSYour Name 
134*5113495bSYour Name 
135*5113495bSYour Name /* Description		UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER
136*5113495bSYour Name 
137*5113495bSYour Name 			Consumer: SW , DEBUG
138*5113495bSYour Name 
139*5113495bSYour Name 			Producer: REO
140*5113495bSYour Name 
141*5113495bSYour Name 
142*5113495bSYour Name 
143*5113495bSYour Name 			The value in this field is equal to value of the
144*5113495bSYour Name 			'REO_CMD_Number' field the REO command
145*5113495bSYour Name 
146*5113495bSYour Name 
147*5113495bSYour Name 
148*5113495bSYour Name 			This field helps to correlate the statuses with the REO
149*5113495bSYour Name 			commands.
150*5113495bSYour Name 
151*5113495bSYour Name 
152*5113495bSYour Name 
153*5113495bSYour Name 			<legal all>
154*5113495bSYour Name */
155*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_OFFSET         0x00000000
156*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_LSB            0
157*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_MASK           0x0000ffff
158*5113495bSYour Name 
159*5113495bSYour Name /* Description		UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME
160*5113495bSYour Name 
161*5113495bSYour Name 			Consumer: DEBUG
162*5113495bSYour Name 
163*5113495bSYour Name 			Producer: REO
164*5113495bSYour Name 
165*5113495bSYour Name 
166*5113495bSYour Name 
167*5113495bSYour Name 			The amount of time REO took to excecute the command.
168*5113495bSYour Name 			Note that this time does not include the duration of the
169*5113495bSYour Name 			command waiting in the command ring, before the execution
170*5113495bSYour Name 			started.
171*5113495bSYour Name 
172*5113495bSYour Name 
173*5113495bSYour Name 
174*5113495bSYour Name 			In us.
175*5113495bSYour Name 
176*5113495bSYour Name 
177*5113495bSYour Name 
178*5113495bSYour Name 			<legal all>
179*5113495bSYour Name */
180*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_OFFSET        0x00000000
181*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_LSB           16
182*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_MASK          0x03ff0000
183*5113495bSYour Name 
184*5113495bSYour Name /* Description		UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS
185*5113495bSYour Name 
186*5113495bSYour Name 			Consumer: DEBUG
187*5113495bSYour Name 
188*5113495bSYour Name 			Producer: REO
189*5113495bSYour Name 
190*5113495bSYour Name 
191*5113495bSYour Name 
192*5113495bSYour Name 			Execution status of the command.
193*5113495bSYour Name 
194*5113495bSYour Name 
195*5113495bSYour Name 
196*5113495bSYour Name 			<enum 0 reo_successful_execution> Command has
197*5113495bSYour Name 			successfully be executed
198*5113495bSYour Name 
199*5113495bSYour Name 			<enum 1 reo_blocked_execution> Command could not be
200*5113495bSYour Name 			executed as the queue or cache was blocked
201*5113495bSYour Name 
202*5113495bSYour Name 			<enum 2 reo_failed_execution> Command has encountered
203*5113495bSYour Name 			problems when executing, like the queue descriptor not being
204*5113495bSYour Name 			valid. None of the status fields in the entire STATUS TLV
205*5113495bSYour Name 			are valid.
206*5113495bSYour Name 
207*5113495bSYour Name 			<enum 3 reo_resource_blocked> Command is NOT  executed
208*5113495bSYour Name 			because one or more descriptors were blocked. This is SW
209*5113495bSYour Name 			programming mistake.
210*5113495bSYour Name 
211*5113495bSYour Name 			None of the status fields in the entire STATUS TLV are
212*5113495bSYour Name 			valid.
213*5113495bSYour Name 
214*5113495bSYour Name 
215*5113495bSYour Name 
216*5113495bSYour Name 			<legal  0-3>
217*5113495bSYour Name */
218*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_OFFSET  0x00000000
219*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_LSB     26
220*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_MASK    0x0c000000
221*5113495bSYour Name 
222*5113495bSYour Name /* Description		UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A
223*5113495bSYour Name 
224*5113495bSYour Name 			<legal 0>
225*5113495bSYour Name */
226*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_OFFSET               0x00000000
227*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_LSB                  28
228*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_MASK                 0xf0000000
229*5113495bSYour Name 
230*5113495bSYour Name /* Description		UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP
231*5113495bSYour Name 
232*5113495bSYour Name 			Timestamp at the moment that this status report is
233*5113495bSYour Name 			written.
234*5113495bSYour Name 
235*5113495bSYour Name 
236*5113495bSYour Name 
237*5113495bSYour Name 			<legal all>
238*5113495bSYour Name */
239*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_OFFSET                 0x00000004
240*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_LSB                    0
241*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_MASK                   0xffffffff
242*5113495bSYour Name 
243*5113495bSYour Name 
244*5113495bSYour Name #endif // _UNIFORM_REO_STATUS_HEADER_H_
245