xref: /wlan-driver/fw-api/hw/qcn9000/uniform_reo_status_header.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2019, The Linux Foundation. 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 #ifndef _UNIFORM_REO_STATUS_HEADER_H_
18*5113495bSYour Name #define _UNIFORM_REO_STATUS_HEADER_H_
19*5113495bSYour Name #if !defined(__ASSEMBLER__)
20*5113495bSYour Name #endif
21*5113495bSYour Name 
22*5113495bSYour Name 
23*5113495bSYour Name // ################ START SUMMARY #################
24*5113495bSYour Name //
25*5113495bSYour Name //	Dword	Fields
26*5113495bSYour Name //	0	reo_status_number[15:0], cmd_execution_time[25:16], reo_cmd_execution_status[27:26], reserved_0a[31:28]
27*5113495bSYour Name //	1	timestamp[31:0]
28*5113495bSYour Name //
29*5113495bSYour Name // ################ END SUMMARY #################
30*5113495bSYour Name 
31*5113495bSYour Name #define NUM_OF_DWORDS_UNIFORM_REO_STATUS_HEADER 2
32*5113495bSYour Name 
33*5113495bSYour Name struct uniform_reo_status_header {
34*5113495bSYour Name              uint32_t reo_status_number               : 16, //[15:0]
35*5113495bSYour Name                       cmd_execution_time              : 10, //[25:16]
36*5113495bSYour Name                       reo_cmd_execution_status        :  2, //[27:26]
37*5113495bSYour Name                       reserved_0a                     :  4; //[31:28]
38*5113495bSYour Name              uint32_t timestamp                       : 32; //[31:0]
39*5113495bSYour Name };
40*5113495bSYour Name 
41*5113495bSYour Name /*
42*5113495bSYour Name 
43*5113495bSYour Name reo_status_number
44*5113495bSYour Name 
45*5113495bSYour Name 			Consumer: SW , DEBUG
46*5113495bSYour Name 
47*5113495bSYour Name 			Producer: REO
48*5113495bSYour Name 
49*5113495bSYour Name 
50*5113495bSYour Name 
51*5113495bSYour Name 			The value in this field is equal to value of the
52*5113495bSYour Name 			'REO_CMD_Number' field the REO command
53*5113495bSYour Name 
54*5113495bSYour Name 
55*5113495bSYour Name 
56*5113495bSYour Name 			This field helps to correlate the statuses with the REO
57*5113495bSYour Name 			commands.
58*5113495bSYour Name 
59*5113495bSYour Name 
60*5113495bSYour Name 
61*5113495bSYour Name 			<legal all>
62*5113495bSYour Name 
63*5113495bSYour Name cmd_execution_time
64*5113495bSYour Name 
65*5113495bSYour Name 			Consumer: DEBUG
66*5113495bSYour Name 
67*5113495bSYour Name 			Producer: REO
68*5113495bSYour Name 
69*5113495bSYour Name 
70*5113495bSYour Name 
71*5113495bSYour Name 			The amount of time REO took to excecute the command.
72*5113495bSYour Name 			Note that this time does not include the duration of the
73*5113495bSYour Name 			command waiting in the command ring, before the execution
74*5113495bSYour Name 			started.
75*5113495bSYour Name 
76*5113495bSYour Name 
77*5113495bSYour Name 
78*5113495bSYour Name 			In us.
79*5113495bSYour Name 
80*5113495bSYour Name 
81*5113495bSYour Name 
82*5113495bSYour Name 			<legal all>
83*5113495bSYour Name 
84*5113495bSYour Name reo_cmd_execution_status
85*5113495bSYour Name 
86*5113495bSYour Name 			Consumer: DEBUG
87*5113495bSYour Name 
88*5113495bSYour Name 			Producer: REO
89*5113495bSYour Name 
90*5113495bSYour Name 
91*5113495bSYour Name 
92*5113495bSYour Name 			Execution status of the command.
93*5113495bSYour Name 
94*5113495bSYour Name 
95*5113495bSYour Name 
96*5113495bSYour Name 			<enum 0 reo_successful_execution> Command has
97*5113495bSYour Name 			successfully be executed
98*5113495bSYour Name 
99*5113495bSYour Name 			<enum 1 reo_blocked_execution> Command could not be
100*5113495bSYour Name 			executed as the queue or cache was blocked
101*5113495bSYour Name 
102*5113495bSYour Name 			<enum 2 reo_failed_execution> Command has encountered
103*5113495bSYour Name 			problems when executing, like the queue descriptor not being
104*5113495bSYour Name 			valid. None of the status fields in the entire STATUS TLV
105*5113495bSYour Name 			are valid.
106*5113495bSYour Name 
107*5113495bSYour Name 			<enum 3 reo_resource_blocked> Command is NOT  executed
108*5113495bSYour Name 			because one or more descriptors were blocked. This is SW
109*5113495bSYour Name 			programming mistake.
110*5113495bSYour Name 
111*5113495bSYour Name 			None of the status fields in the entire STATUS TLV are
112*5113495bSYour Name 			valid.
113*5113495bSYour Name 
114*5113495bSYour Name 
115*5113495bSYour Name 
116*5113495bSYour Name 			<legal  0-3>
117*5113495bSYour Name 
118*5113495bSYour Name reserved_0a
119*5113495bSYour Name 
120*5113495bSYour Name 			<legal 0>
121*5113495bSYour Name 
122*5113495bSYour Name timestamp
123*5113495bSYour Name 
124*5113495bSYour Name 			Timestamp at the moment that this status report is
125*5113495bSYour Name 			written.
126*5113495bSYour Name 
127*5113495bSYour Name 
128*5113495bSYour Name 
129*5113495bSYour Name 			<legal all>
130*5113495bSYour Name */
131*5113495bSYour Name 
132*5113495bSYour Name 
133*5113495bSYour Name /* Description		UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER
134*5113495bSYour Name 
135*5113495bSYour Name 			Consumer: SW , DEBUG
136*5113495bSYour Name 
137*5113495bSYour Name 			Producer: REO
138*5113495bSYour Name 
139*5113495bSYour Name 
140*5113495bSYour Name 
141*5113495bSYour Name 			The value in this field is equal to value of the
142*5113495bSYour Name 			'REO_CMD_Number' field the REO command
143*5113495bSYour Name 
144*5113495bSYour Name 
145*5113495bSYour Name 
146*5113495bSYour Name 			This field helps to correlate the statuses with the REO
147*5113495bSYour Name 			commands.
148*5113495bSYour Name 
149*5113495bSYour Name 
150*5113495bSYour Name 
151*5113495bSYour Name 			<legal all>
152*5113495bSYour Name */
153*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_OFFSET         0x00000000
154*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_LSB            0
155*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_STATUS_NUMBER_MASK           0x0000ffff
156*5113495bSYour Name 
157*5113495bSYour Name /* Description		UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME
158*5113495bSYour Name 
159*5113495bSYour Name 			Consumer: DEBUG
160*5113495bSYour Name 
161*5113495bSYour Name 			Producer: REO
162*5113495bSYour Name 
163*5113495bSYour Name 
164*5113495bSYour Name 
165*5113495bSYour Name 			The amount of time REO took to excecute the command.
166*5113495bSYour Name 			Note that this time does not include the duration of the
167*5113495bSYour Name 			command waiting in the command ring, before the execution
168*5113495bSYour Name 			started.
169*5113495bSYour Name 
170*5113495bSYour Name 
171*5113495bSYour Name 
172*5113495bSYour Name 			In us.
173*5113495bSYour Name 
174*5113495bSYour Name 
175*5113495bSYour Name 
176*5113495bSYour Name 			<legal all>
177*5113495bSYour Name */
178*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_OFFSET        0x00000000
179*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_LSB           16
180*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_CMD_EXECUTION_TIME_MASK          0x03ff0000
181*5113495bSYour Name 
182*5113495bSYour Name /* Description		UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS
183*5113495bSYour Name 
184*5113495bSYour Name 			Consumer: DEBUG
185*5113495bSYour Name 
186*5113495bSYour Name 			Producer: REO
187*5113495bSYour Name 
188*5113495bSYour Name 
189*5113495bSYour Name 
190*5113495bSYour Name 			Execution status of the command.
191*5113495bSYour Name 
192*5113495bSYour Name 
193*5113495bSYour Name 
194*5113495bSYour Name 			<enum 0 reo_successful_execution> Command has
195*5113495bSYour Name 			successfully be executed
196*5113495bSYour Name 
197*5113495bSYour Name 			<enum 1 reo_blocked_execution> Command could not be
198*5113495bSYour Name 			executed as the queue or cache was blocked
199*5113495bSYour Name 
200*5113495bSYour Name 			<enum 2 reo_failed_execution> Command has encountered
201*5113495bSYour Name 			problems when executing, like the queue descriptor not being
202*5113495bSYour Name 			valid. None of the status fields in the entire STATUS TLV
203*5113495bSYour Name 			are valid.
204*5113495bSYour Name 
205*5113495bSYour Name 			<enum 3 reo_resource_blocked> Command is NOT  executed
206*5113495bSYour Name 			because one or more descriptors were blocked. This is SW
207*5113495bSYour Name 			programming mistake.
208*5113495bSYour Name 
209*5113495bSYour Name 			None of the status fields in the entire STATUS TLV are
210*5113495bSYour Name 			valid.
211*5113495bSYour Name 
212*5113495bSYour Name 
213*5113495bSYour Name 
214*5113495bSYour Name 			<legal  0-3>
215*5113495bSYour Name */
216*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_OFFSET  0x00000000
217*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_LSB     26
218*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_REO_CMD_EXECUTION_STATUS_MASK    0x0c000000
219*5113495bSYour Name 
220*5113495bSYour Name /* Description		UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A
221*5113495bSYour Name 
222*5113495bSYour Name 			<legal 0>
223*5113495bSYour Name */
224*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_OFFSET               0x00000000
225*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_LSB                  28
226*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_0_RESERVED_0A_MASK                 0xf0000000
227*5113495bSYour Name 
228*5113495bSYour Name /* Description		UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP
229*5113495bSYour Name 
230*5113495bSYour Name 			Timestamp at the moment that this status report is
231*5113495bSYour Name 			written.
232*5113495bSYour Name 
233*5113495bSYour Name 
234*5113495bSYour Name 
235*5113495bSYour Name 			<legal all>
236*5113495bSYour Name */
237*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_OFFSET                 0x00000004
238*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_LSB                    0
239*5113495bSYour Name #define UNIFORM_REO_STATUS_HEADER_1_TIMESTAMP_MASK                   0xffffffff
240*5113495bSYour Name 
241*5113495bSYour Name 
242*5113495bSYour Name #endif // _UNIFORM_REO_STATUS_HEADER_H_
243