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