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