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