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