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