xref: /wlan-driver/fw-api/hw/qca9574/reo_unblock_cache.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2021 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 // $ATH_LICENSE_HW_HDR_C$
18 //
19 // DO NOT EDIT!  This file is automatically generated
20 //               These definitions are tied to a particular hardware layout
21 
22 
23 #ifndef _REO_UNBLOCK_CACHE_H_
24 #define _REO_UNBLOCK_CACHE_H_
25 #if !defined(__ASSEMBLER__)
26 #endif
27 
28 #include "uniform_reo_cmd_header.h"
29 
30 // ################ START SUMMARY #################
31 //
32 //	Dword	Fields
33 //	0	struct uniform_reo_cmd_header cmd_header;
34 //	1	unblock_type[0], cache_block_resource_index[2:1], reserved_1a[31:3]
35 //	2	reserved_2a[31:0]
36 //	3	reserved_3a[31:0]
37 //	4	reserved_4a[31:0]
38 //	5	reserved_5a[31:0]
39 //	6	reserved_6a[31:0]
40 //	7	reserved_7a[31:0]
41 //	8	reserved_8a[31:0]
42 //
43 // ################ END SUMMARY #################
44 
45 #define NUM_OF_DWORDS_REO_UNBLOCK_CACHE 9
46 
47 struct reo_unblock_cache {
48     struct            uniform_reo_cmd_header                       cmd_header;
49              uint32_t unblock_type                    :  1, //[0]
50                       cache_block_resource_index      :  2, //[2:1]
51                       reserved_1a                     : 29; //[31:3]
52              uint32_t reserved_2a                     : 32; //[31:0]
53              uint32_t reserved_3a                     : 32; //[31:0]
54              uint32_t reserved_4a                     : 32; //[31:0]
55              uint32_t reserved_5a                     : 32; //[31:0]
56              uint32_t reserved_6a                     : 32; //[31:0]
57              uint32_t reserved_7a                     : 32; //[31:0]
58              uint32_t reserved_8a                     : 32; //[31:0]
59 };
60 
61 /*
62 
63 struct uniform_reo_cmd_header cmd_header
64 
65 			Consumer: REO
66 
67 			Producer: SW
68 
69 
70 
71 			Details for command execution tracking purposes.
72 
73 unblock_type
74 
75 			Unblock type
76 
77 
78 
79 			<enum 0 unblock_resource_index> Unblock a block
80 			resource, whose index is given in field
81 			'cache_block_resource_index'.
82 
83 			If the indicated blocking resource is not in use (=> not
84 			blocking an address at the moment), the command status will
85 			indicate an error.
86 
87 
88 
89 			<enum 1 unblock_cache> The entire cache usage is
90 			unblocked.
91 
92 			If the entire cache is not in a blocked mode at the
93 			moment this command is received, the command status will
94 			indicate an error.
95 
96 			Note that unlocking the entire cache has no changes to
97 			the current settings of the blocking resource settings
98 
99 
100 
101 			<legal all>
102 
103 cache_block_resource_index
104 
105 			Field not valid when field Unblock_type is set to
106 			unblock_cache.
107 
108 
109 
110 			Indicates which of the four blocking resources in REO
111 			should be released from blocking a (descriptor) address.
112 
113 			<legal all>
114 
115 reserved_1a
116 
117 			<legal 0>
118 
119 reserved_2a
120 
121 			<legal 0>
122 
123 reserved_3a
124 
125 			<legal 0>
126 
127 reserved_4a
128 
129 			<legal 0>
130 
131 reserved_5a
132 
133 			<legal 0>
134 
135 reserved_6a
136 
137 			<legal 0>
138 
139 reserved_7a
140 
141 			<legal 0>
142 
143 reserved_8a
144 
145 			<legal 0>
146 */
147 
148 
149  /* EXTERNAL REFERENCE : struct uniform_reo_cmd_header cmd_header */
150 
151 
152 /* Description		REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_CMD_NUMBER
153 
154 			Consumer: REO/SW/DEBUG
155 
156 			Producer: SW
157 
158 
159 
160 			This number can be used by SW to track, identify and
161 			link the created commands with the command statusses
162 
163 
164 
165 
166 
167 			<legal all>
168 */
169 #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_CMD_NUMBER_OFFSET         0x00000000
170 #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_CMD_NUMBER_LSB            0
171 #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_CMD_NUMBER_MASK           0x0000ffff
172 
173 /* Description		REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_STATUS_REQUIRED
174 
175 			Consumer: REO
176 
177 			Producer: SW
178 
179 
180 
181 			<enum 0 NoStatus> REO does not need to generate a status
182 			TLV for the execution of this command
183 
184 			<enum 1 StatusRequired> REO shall generate a status TLV
185 			for the execution of this command
186 
187 
188 
189 			<legal all>
190 */
191 #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_STATUS_REQUIRED_OFFSET    0x00000000
192 #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_STATUS_REQUIRED_LSB       16
193 #define REO_UNBLOCK_CACHE_0_CMD_HEADER_REO_STATUS_REQUIRED_MASK      0x00010000
194 
195 /* Description		REO_UNBLOCK_CACHE_0_CMD_HEADER_RESERVED_0A
196 
197 			<legal 0>
198 */
199 #define REO_UNBLOCK_CACHE_0_CMD_HEADER_RESERVED_0A_OFFSET            0x00000000
200 #define REO_UNBLOCK_CACHE_0_CMD_HEADER_RESERVED_0A_LSB               17
201 #define REO_UNBLOCK_CACHE_0_CMD_HEADER_RESERVED_0A_MASK              0xfffe0000
202 
203 /* Description		REO_UNBLOCK_CACHE_1_UNBLOCK_TYPE
204 
205 			Unblock type
206 
207 
208 
209 			<enum 0 unblock_resource_index> Unblock a block
210 			resource, whose index is given in field
211 			'cache_block_resource_index'.
212 
213 			If the indicated blocking resource is not in use (=> not
214 			blocking an address at the moment), the command status will
215 			indicate an error.
216 
217 
218 
219 			<enum 1 unblock_cache> The entire cache usage is
220 			unblocked.
221 
222 			If the entire cache is not in a blocked mode at the
223 			moment this command is received, the command status will
224 			indicate an error.
225 
226 			Note that unlocking the entire cache has no changes to
227 			the current settings of the blocking resource settings
228 
229 
230 
231 			<legal all>
232 */
233 #define REO_UNBLOCK_CACHE_1_UNBLOCK_TYPE_OFFSET                      0x00000004
234 #define REO_UNBLOCK_CACHE_1_UNBLOCK_TYPE_LSB                         0
235 #define REO_UNBLOCK_CACHE_1_UNBLOCK_TYPE_MASK                        0x00000001
236 
237 /* Description		REO_UNBLOCK_CACHE_1_CACHE_BLOCK_RESOURCE_INDEX
238 
239 			Field not valid when field Unblock_type is set to
240 			unblock_cache.
241 
242 
243 
244 			Indicates which of the four blocking resources in REO
245 			should be released from blocking a (descriptor) address.
246 
247 			<legal all>
248 */
249 #define REO_UNBLOCK_CACHE_1_CACHE_BLOCK_RESOURCE_INDEX_OFFSET        0x00000004
250 #define REO_UNBLOCK_CACHE_1_CACHE_BLOCK_RESOURCE_INDEX_LSB           1
251 #define REO_UNBLOCK_CACHE_1_CACHE_BLOCK_RESOURCE_INDEX_MASK          0x00000006
252 
253 /* Description		REO_UNBLOCK_CACHE_1_RESERVED_1A
254 
255 			<legal 0>
256 */
257 #define REO_UNBLOCK_CACHE_1_RESERVED_1A_OFFSET                       0x00000004
258 #define REO_UNBLOCK_CACHE_1_RESERVED_1A_LSB                          3
259 #define REO_UNBLOCK_CACHE_1_RESERVED_1A_MASK                         0xfffffff8
260 
261 /* Description		REO_UNBLOCK_CACHE_2_RESERVED_2A
262 
263 			<legal 0>
264 */
265 #define REO_UNBLOCK_CACHE_2_RESERVED_2A_OFFSET                       0x00000008
266 #define REO_UNBLOCK_CACHE_2_RESERVED_2A_LSB                          0
267 #define REO_UNBLOCK_CACHE_2_RESERVED_2A_MASK                         0xffffffff
268 
269 /* Description		REO_UNBLOCK_CACHE_3_RESERVED_3A
270 
271 			<legal 0>
272 */
273 #define REO_UNBLOCK_CACHE_3_RESERVED_3A_OFFSET                       0x0000000c
274 #define REO_UNBLOCK_CACHE_3_RESERVED_3A_LSB                          0
275 #define REO_UNBLOCK_CACHE_3_RESERVED_3A_MASK                         0xffffffff
276 
277 /* Description		REO_UNBLOCK_CACHE_4_RESERVED_4A
278 
279 			<legal 0>
280 */
281 #define REO_UNBLOCK_CACHE_4_RESERVED_4A_OFFSET                       0x00000010
282 #define REO_UNBLOCK_CACHE_4_RESERVED_4A_LSB                          0
283 #define REO_UNBLOCK_CACHE_4_RESERVED_4A_MASK                         0xffffffff
284 
285 /* Description		REO_UNBLOCK_CACHE_5_RESERVED_5A
286 
287 			<legal 0>
288 */
289 #define REO_UNBLOCK_CACHE_5_RESERVED_5A_OFFSET                       0x00000014
290 #define REO_UNBLOCK_CACHE_5_RESERVED_5A_LSB                          0
291 #define REO_UNBLOCK_CACHE_5_RESERVED_5A_MASK                         0xffffffff
292 
293 /* Description		REO_UNBLOCK_CACHE_6_RESERVED_6A
294 
295 			<legal 0>
296 */
297 #define REO_UNBLOCK_CACHE_6_RESERVED_6A_OFFSET                       0x00000018
298 #define REO_UNBLOCK_CACHE_6_RESERVED_6A_LSB                          0
299 #define REO_UNBLOCK_CACHE_6_RESERVED_6A_MASK                         0xffffffff
300 
301 /* Description		REO_UNBLOCK_CACHE_7_RESERVED_7A
302 
303 			<legal 0>
304 */
305 #define REO_UNBLOCK_CACHE_7_RESERVED_7A_OFFSET                       0x0000001c
306 #define REO_UNBLOCK_CACHE_7_RESERVED_7A_LSB                          0
307 #define REO_UNBLOCK_CACHE_7_RESERVED_7A_MASK                         0xffffffff
308 
309 /* Description		REO_UNBLOCK_CACHE_8_RESERVED_8A
310 
311 			<legal 0>
312 */
313 #define REO_UNBLOCK_CACHE_8_RESERVED_8A_OFFSET                       0x00000020
314 #define REO_UNBLOCK_CACHE_8_RESERVED_8A_LSB                          0
315 #define REO_UNBLOCK_CACHE_8_RESERVED_8A_MASK                         0xffffffff
316 
317 
318 #endif // _REO_UNBLOCK_CACHE_H_
319