1 /*
2  * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /*
21  * Implementation of the Host-side Host InterFace (HIF) API
22  * for a Host/Target interconnect using Copy Engines over PCIe.
23  */
24 
25 #ifndef __HIF_PCI_INTERNAL_H__
26 #define __HIF_PCI_INTERNAL_H__
27 
28 #ifndef PEER_CACHEING_HOST_ENABLE
29 #define PEER_CACHEING_HOST_ENABLE 0
30 #endif
31 
32 #define HIF_PCI_DEBUG   ATH_DEBUG_MAKE_MODULE_MASK(0)
33 #define HIF_PCI_IPA_UC_ASSIGNED_CE  5
34 
35 #if defined(QCA_LOWMEM_CONFIG) || defined(QCA_512M_CONFIG)
36 #define WMI_CE_BUF_SIZE 2048
37 #else
38 /*
39  * WMI_CE_BUF_SIZE = (SKB_SIZE - 64BIT_SH_INFO -
40  *		      NETBUF_FIXED_MIN_HEADROOM - WMI_HEADROOM)
41  * 3520 = (4096 - 384 - 128 - 64)
42  */
43 #define WMI_CE_BUF_SIZE 3520
44 #endif
45 
46 #if defined(WLAN_DEBUG) || defined(DEBUG)
47 static ATH_DEBUG_MASK_DESCRIPTION g_hif_debug_description[] = {
48 	{HIF_PCI_DEBUG, "hif_pci"},
49 };
50 
51 ATH_DEBUG_INSTANTIATE_MODULE_VAR(hif, "hif", "PCIe Host Interface",
52 				ATH_DEBUG_MASK_DEFAULTS | ATH_DEBUG_INFO,
53 				ATH_DEBUG_DESCRIPTION_COUNT
54 					 (g_hif_debug_description),
55 				 g_hif_debug_description);
56 #endif
57 
58 #ifdef CONFIG_ATH_PCIE_ACCESS_DEBUG
59 /* globals are initialized to 0 by the compiler */;
60 spinlock_t pcie_access_log_lock;
61 unsigned int pcie_access_log_seqnum;
62 struct HIF_ACCESS_LOG pcie_access_log[PCIE_ACCESS_LOG_NUM];
63 static void hif_target_dump_access_log(void);
64 #endif
65 
66 /*
67  * Host software's Copy Engine configuration.
68  * This table is derived from the CE_PCI TABLE, above.
69  */
70 #ifdef BIG_ENDIAN_HOST
71 #define CE_ATTR_FLAGS CE_ATTR_BYTE_SWAP_DATA
72 #else
73 #define CE_ATTR_FLAGS 0
74 #endif
75 
76 /* Maximum number of Copy Engine's supported */
77 #define CE_HTT_H2T_MSG_SRC_NENTRIES 2048
78 #define CE_HTT_H2T_MSG_SRC_NENTRIES_QCA6390 256
79 #define CE_HTT_H2T_MSG_SRC_NENTRIES_QCA6490 256
80 #define CE_HTT_H2T_MSG_SRC_NENTRIES_AR900B 4096
81 #define CE_HTT_H2T_MSG_SRC_NENTRIES_QCN7605 4096
82 
83 #define EPPING_CE_FLAGS_POLL \
84 	(CE_ATTR_DISABLE_INTR|CE_ATTR_ENABLE_POLL|CE_ATTR_FLAGS)
85 
86 #define CE_ATTR_DIAG_FLAGS \
87 	(CE_ATTR_FLAGS | CE_ATTR_DIAG)
88 
89 #ifdef ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST
90 #define CE4_COMP_HTT_HTC CE_ATTR_FLAGS
91 #else
92 #define CE4_COMP_HTT_HTC (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR)
93 #endif
94 
95 #ifdef QCN7605_SUPPORT
96 
97 #define QCN7605_CE_COUNT 9
98 static struct CE_attr host_ce_config_wlan_qcn7605[] = {
99 	/* host->target HTC control and raw streams & WMI Control*/
100 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
101 	/* target->host HTT + HTC control */
102 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
103 	/* target->host WMI */
104 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
105 	/* target->host HTT */
106 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
107 	/* host->target HTT */
108 	{ /* CE4 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
109 		CE_HTT_H2T_MSG_SRC_NENTRIES_QCN7605, 256, 0, NULL,},
110 #ifdef IPA_OFFLOAD
111 	/* ipa_uc->target HTC control */
112 	{ /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
113 		CE_HTT_H2T_MSG_SRC_NENTRIES, 512, 0, NULL,},
114 #else
115 	/* unused */
116 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
117 #endif
118 	/* Target autonomous HIF_memcpy */
119 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
120 #ifdef REMOVE_PKT_LOG
121 	/* unused */
122 	{ /* CE7 */ 0, 0, 0, 0, 0, NULL,},
123 #else
124 	/* target->host PKTLOG */
125 	{ /* CE7 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
126 #endif
127 #ifdef IPA_OFFLOAD
128 	/* Target to uMC */
129 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
130 #else
131 	/* target->host HTT*/
132 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
133 #endif
134 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
135 };
136 
137 static struct CE_pipe_config target_ce_config_wlan_qcn7605[] = {
138 	/* host->target HTC control and raw streams */
139 	{ /* CE0 */ 0, PIPEDIR_OUT, 4, 2048, CE_ATTR_FLAGS, 0,},
140 	/* target->host HTT */
141 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
142 	/* target->host WMI  + HTC control */
143 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
144 	/* target->host HTT */
145 	{ /* CE3 */ 3, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
146 	/* host->target HTT */
147 	{ /* CE4 */ 4, PIPEDIR_OUT, 128, 256,
148 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
149 	/* NB: 50% of src nentries, since tx has 2 frags */
150 #ifdef IPA_OFFLOAD
151 	/* ipa_uc->target */
152 	{ /* CE5 */ 5, PIPEDIR_OUT, 128, 256,
153 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
154 #else
155 	/* unused */
156 	{ /* CE5 */ 5, PIPEDIR_INOUT_H2H, 0, 0, 0, 0,},
157 #endif
158 	/* Reserved for target autonomous HIF_memcpy */
159 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
160 #ifdef REMOVE_PKT_LOG
161 	/* unused */
162 	{ /* CE7 */ 7, PIPEDIR_IN,  2, 2048, CE_ATTR_FLAGS, 0,},
163 #else
164 	/* Target -> host PKTLOG */
165 	{ /* CE7 */ 7, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
166 #endif
167 #ifdef IPA_OFFLOAD
168 	/* CE8 used only by IPA */
169 	{ /* CE8 */ 8, PIPEDIR_IN, 128, 4096, CE_ATTR_FLAGS, 0,},
170 #else
171 	/* target->host HTT*/
172 	{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
173 #endif
174 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
175 };
176 #endif
177 
178 #ifdef QCA_WIFI_3_0
179 static struct CE_attr host_ce_config_wlan[] = {
180 	/* host->target HTC control and raw streams */
181 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
182 	/* target->host HTT + HTC control */
183 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
184 	/* target->host WMI */
185 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  2048, 128, NULL,},
186 	/* host->target WMI */
187 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
188 	/* host->target HTT */
189 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0,
190 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
191 	/* ipa_uc->target HTC control */
192 	{ /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
193 		CE_HTT_H2T_MSG_SRC_NENTRIES, 512, 0, NULL,},
194 	/* Target autonomous HIF_memcpy */
195 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
196 	/* ce_diag, the Diagnostic Window */
197 	{ /* CE7 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
198 	/* Target to uMC */
199 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
200 	/* target->host HTT */
201 	{ /* CE9 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
202 	/* target->host HTT */
203 	{ /* CE10 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
204 	/* target -> host PKTLOG */
205 	{ /* CE11 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
206 };
207 
208 static struct CE_pipe_config target_ce_config_wlan[] = {
209 	/* host->target HTC control and raw streams */
210 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
211 	/* target->host HTT */
212 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
213 	/* target->host WMI  + HTC control */
214 	{ /* CE2 */ 2, PIPEDIR_IN,  64, 2048, CE_ATTR_FLAGS, 0,},
215 	/* host->target WMI */
216 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
217 	/* host->target HTT */
218 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE4_COMP_HTT_HTC, 0,},
219 	/* NB: 50% of src nentries, since tx has 2 frags */
220 	/* ipa_uc->target */
221 	{ /* CE5 */ 5, PIPEDIR_OUT, 1024,   64,
222 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
223 	/* Reserved for target autonomous HIF_memcpy */
224 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
225 	/* CE7 used only by Host */
226 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
227 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
228 	/* CE8 used only by IPA */
229 	{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
230 	/* CE9 target->host HTT */
231 	{ /* CE9 */ 9, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
232 	/* CE10 target->host HTT */
233 	{ /* CE10 */ 10, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
234 	/* Target -> host PKTLOG */
235 	{ /* CE11 */ 11, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
236 };
237 
238 #ifdef WLAN_FEATURE_EPPING
239 #define EPPING_HOST_CE_COUNT 8
240 static struct CE_attr host_ce_config_wlan_epping_poll[] = {
241 	/* host->target HTC control and raw streams */
242 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
243 	/* target->host EP-ping */
244 	{ /* CE1 */ EPPING_CE_FLAGS_POLL, 0, 0, 2048, 128, NULL,},
245 	/* target->host EP-ping */
246 	{ /* CE2 */ EPPING_CE_FLAGS_POLL, 0, 0, 2048, 128, NULL,},
247 	/* host->target EP-ping */
248 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
249 	/* host->target EP-ping */
250 	{ /* CE4 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
251 	/* EP-ping heartbeat */
252 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0,   2048, 128, NULL,},
253 	/* unused */
254 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0,   0, 0, NULL,},
255 	/* ce_diag, the Diagnostic Window */
256 	{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0, 2,   DIAG_TRANSFER_LIMIT, 2, NULL,},
257 };
258 
259 #ifdef QCN7605_SUPPORT
260 static struct CE_attr host_ce_config_wlan_epping_irq[] = {
261 	/* host->target HTC control and raw streams */
262 	{ /* CE0 */ CE_ATTR_FLAGS, 0,  16, 2048, 0, NULL,},
263 	/* target->host EP-ping */
264 	{ /* CE1 */ CE_ATTR_FLAGS, 0,   0, 2048, 32, NULL,},
265 	/* target->host EP-ping */
266 	{ /* CE2 */ CE_ATTR_FLAGS, 0,   0, 2048, 32, NULL,},
267 	/* host->target EP-ping */
268 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
269 	/* host->target EP-ping */
270 	{ /* CE4 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
271 	/* EP-ping heartbeat */
272 	{ /* CE5 */ CE_ATTR_FLAGS, 0,   0, 2048, 16, NULL,},
273 	/* unused */
274 	{ /* CE6 */ CE_ATTR_FLAGS, 0,   0, 0, 0, NULL,},
275 	/* ce_diag, the Diagnostic Window */
276 	{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0,   2, DIAG_TRANSFER_LIMIT, 2, NULL,},
277 };
278 
279 /*
280  * EP-ping firmware's CE configuration
281  */
282 static struct CE_pipe_config target_ce_config_wlan_epping[] = {
283 	/* host->target HTC control and raw streams */
284 	{ /* CE0 */ 0, PIPEDIR_OUT,  16, 2048, CE_ATTR_FLAGS, 0,},
285 	/* target->host EP-ping */
286 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
287 	/* target->host EP-ping */
288 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
289 	/* host->target EP-ping */
290 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
291 	/* host->target EP-ping */
292 	{ /* CE4 */ 4, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
293 	/* EP-ping heartbeat */
294 	{ /* CE5 */ 5, PIPEDIR_IN,  16, 2048, CE_ATTR_FLAGS, 0,},
295 	/* unused */
296 	{ /* CE6 */ 6, PIPEDIR_INOUT, 0, 0, CE_ATTR_FLAGS, 0,},
297 	/* CE7 used only by Host */
298 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0, 0, 0,},
299 	/* CE8 used only by IPA */
300 	{ /* CE8 */ 8, PIPEDIR_IN, 4, 2048, CE_ATTR_FLAGS, 0,}
301 };
302 #else
303 static struct CE_attr host_ce_config_wlan_epping_irq[] = {
304 	/* host->target HTC control and raw streams */
305 	{ /* CE0 */ CE_ATTR_FLAGS, 0,  16, 2048, 0, NULL,},
306 	/* target->host EP-ping */
307 	{ /* CE1 */ CE_ATTR_FLAGS, 0,   0, 2048, 128, NULL,},
308 	/* target->host EP-ping */
309 	{ /* CE2 */ CE_ATTR_FLAGS, 0,   0, 2048, 128, NULL,},
310 	/* host->target EP-ping */
311 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
312 	/* host->target EP-ping */
313 	{ /* CE4 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
314 	/* EP-ping heartbeat */
315 	{ /* CE5 */ CE_ATTR_FLAGS, 0,   0, 2048, 128, NULL,},
316 	/* unused */
317 	{ /* CE6 */ CE_ATTR_FLAGS, 0,   0, 0, 0, NULL,},
318 	/* ce_diag, the Diagnostic Window */
319 	{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0,   2, DIAG_TRANSFER_LIMIT, 2, NULL,},
320 };
321 /*
322  * EP-ping firmware's CE configuration
323  */
324 static struct CE_pipe_config target_ce_config_wlan_epping[] = {
325 	/* host->target HTC control and raw streams */
326 	{ /* CE0 */ 0, PIPEDIR_OUT,  16, 2048, CE_ATTR_FLAGS, 0,},
327 	/* target->host EP-ping */
328 	{ /* CE1 */ 1, PIPEDIR_IN,  128, 2048, CE_ATTR_FLAGS, 0,},
329 	/* target->host EP-ping */
330 	{ /* CE2 */ 2, PIPEDIR_IN,  128, 2048, CE_ATTR_FLAGS, 0,},
331 	/* host->target EP-ping */
332 	{ /* CE3 */ 3, PIPEDIR_OUT, 128, 2048, CE_ATTR_FLAGS, 0,},
333 	/* host->target EP-ping */
334 	{ /* CE4 */ 4, PIPEDIR_OUT, 128, 2048, CE_ATTR_FLAGS, 0,},
335 	/* EP-ping heartbeat */
336 	{ /* CE5 */ 5, PIPEDIR_IN,  128, 2048, CE_ATTR_FLAGS, 0,},
337 	/* unused */
338 	{ /* CE6 */ 6, PIPEDIR_INOUT, 0, 0, CE_ATTR_FLAGS, 0,},
339 	/* CE7 used only by Host */
340 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0, 0, 0,},
341 	/* CE8 used only by IPA */
342 	{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}
343 };
344 #endif
345 #endif
346 #else
347 static struct CE_attr host_ce_config_wlan[] = {
348 	/* host->target HTC control and raw streams */
349 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16,  256, 0, NULL,},
350 	/* target->host HTT + HTC control */
351 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
352 	/* target->host WMI */
353 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  2048, 32, NULL,},
354 	/* host->target WMI */
355 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
356 	/* host->target HTT */
357 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0,
358 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
359 	/* ipa_uc->target HTC control */
360 	{ /* CE5 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0,
361 		1024, 512, 0, NULL,},
362 	/* Target autonomous HIF_memcpy */
363 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
364 	/* ce_diag, the Diagnostic Window */
365 	{ /* CE7 */ (CE_ATTR_DIAG_FLAGS | CE_ATTR_DISABLE_INTR),
366 		0, 2, DIAG_TRANSFER_LIMIT, 2, NULL,},
367 };
368 
369 static struct CE_pipe_config target_ce_config_wlan[] = {
370 	/* host->target HTC control and raw streams */
371 	{ /* CE0 */ 0, PIPEDIR_OUT, 32,  256, CE_ATTR_FLAGS, 0,},
372 	/* target->host HTT + HTC control */
373 	{ /* CE1 */ 1, PIPEDIR_IN, 32,  2048, CE_ATTR_FLAGS, 0,},
374 	/* target->host WMI */
375 	{ /* CE2 */ 2, PIPEDIR_IN, 32,  2048, CE_ATTR_FLAGS, 0,},
376 	/* host->target WMI */
377 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
378 	/* host->target HTT */
379 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE4_COMP_HTT_HTC, 0,},
380 	/* NB: 50% of src nentries, since tx has 2 frags */
381 	/* ipa_uc->target HTC control */
382 	{ /* CE5 */ 5, PIPEDIR_OUT, 1024,   64, CE_ATTR_FLAGS, 0,},
383 	/* Reserved for target autonomous HIF_memcpy */
384 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 4096, CE_ATTR_FLAGS, 0,},
385 	/* CE7 used only by Host */
386 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0, 0, 0,},
387 	/* CE8 used only by IPA */
388 	{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}
389 };
390 
391 #ifdef WLAN_FEATURE_EPPING
392 #define EPPING_HOST_CE_COUNT 12
393 static struct CE_attr host_ce_config_wlan_epping_poll[] = {
394 	/* host->target HTC control and raw streams */
395 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL,},
396 	/* target->host EP-ping */
397 	{ /* CE1 */ EPPING_CE_FLAGS_POLL, 0, 0, 2048, 128, NULL,},
398 	/* target->host EP-ping */
399 	{ /* CE2 */ EPPING_CE_FLAGS_POLL, 0, 0, 2048, 128, NULL,},
400 	/* host->target EP-ping */
401 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
402 	/* host->target EP-ping */
403 	{ /* CE4 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
404 	/* EP-ping heartbeat */
405 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0,   2048, 128, NULL,},
406 	/* unused */
407 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0,   0, 0, NULL,},
408 	/* ce_diag, the Diagnostic Window */
409 	{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0, 2,   DIAG_TRANSFER_LIMIT, 2, NULL,},
410 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
411 	/* The following CEs are not being used yet */
412 	{ /* CE9 */ CE_ATTR_FLAGS, 0, 0,  0, 0, NULL,},
413 	{ /* CE10 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
414 	{ /* CE11 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
415 };
416 static struct CE_attr host_ce_config_wlan_epping_irq[] = {
417 	/* host->target HTC control and raw streams */
418 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL,},
419 	/* target->host EP-ping */
420 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL,},
421 	/* target->host EP-ping */
422 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL,},
423 	/* host->target EP-ping */
424 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
425 	/* host->target EP-ping */
426 	{ /* CE4 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
427 	/* EP-ping heartbeat */
428 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL,},
429 	/* unused */
430 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
431 	/* ce_diag, the Diagnostic Window */
432 	{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL,},
433 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
434 	/* The following CEs are not being used yet */
435 	{ /* CE9 */ CE_ATTR_FLAGS, 0, 0,  0, 0, NULL,},
436 	{ /* CE10 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
437 	{ /* CE11 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
438 };
439 /*
440  * EP-ping firmware's CE configuration
441  */
442 static struct CE_pipe_config target_ce_config_wlan_epping[] = {
443 	/* host->target HTC control and raw streams */
444 	{ /* CE0 */ 0, PIPEDIR_OUT, 16,   256, CE_ATTR_FLAGS, 0,},
445 	/* target->host EP-ping */
446 	{ /* CE1 */ 1, PIPEDIR_IN, 128,  2048, CE_ATTR_FLAGS, 0,},
447 	/* target->host EP-ping */
448 	{ /* CE2 */ 2, PIPEDIR_IN, 128,  2048, CE_ATTR_FLAGS, 0,},
449 	/* host->target EP-ping */
450 	{ /* CE3 */ 3, PIPEDIR_OUT, 128, 2048, CE_ATTR_FLAGS, 0,},
451 	/* host->target EP-ping */
452 	{ /* CE4 */ 4, PIPEDIR_OUT, 128, 2048, CE_ATTR_FLAGS, 0,},
453 	/* EP-ping heartbeat */
454 	{ /* CE5 */ 5, PIPEDIR_IN, 128,  2048, CE_ATTR_FLAGS, 0,},
455 	/* unused */
456 	{ /* CE6 */ 6, PIPEDIR_INOUT, 0, 0, CE_ATTR_FLAGS, 0,},
457 	/* CE7 used only by Host */
458 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0, 0, 0,},
459 	/* CE8 used only by IPA */
460 	{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
461 	{ /* CE9 */ 9, PIPEDIR_IN,  0, 0, CE_ATTR_FLAGS, 0,},
462 	{ /* CE10 */ 10, PIPEDIR_IN,  0, 0, CE_ATTR_FLAGS, 0,},
463 	{ /* CE11 */ 11, PIPEDIR_IN,  0, 0, CE_ATTR_FLAGS, 0,},
464 };
465 #endif
466 #endif
467 
468 static struct CE_attr host_ce_config_wlan_ar9888[] = {
469 	/* host->target HTC control and raw streams */
470 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL, },
471 	/* target->host BMI + HTC control */
472 	/* could be moved to share CE3 */
473 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },
474 	/* target->host WMI */
475 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL, },
476 	/* host->target WMI */
477 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL, },
478 	/* host->target HTT */
479 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0,
480 		CE_HTT_H2T_MSG_SRC_NENTRIES_AR900B, 256, 0, NULL, },
481 #ifdef WLAN_FEATURE_FASTPATH
482 	/* target->host HTT messages */
483 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },
484 #else   /* WLAN_FEATURE_FASTPATH */
485 	/* unused */
486 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
487 #endif  /* WLAN_FEATURE_FASTPATH */
488 	/* Target autonomous HIF_memcpy */
489 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
490 	/* ce_diag, the Diagnostic Window */
491 	{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL, },
492 	/* Target autonomous HIF_memcpy */
493 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
494 };
495 
496 static struct CE_attr host_ce_config_wlan_ar900b[] = {
497 	/* host->target HTC control and raw streams */
498 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL, },
499 	/* target->host BMI + HTC control */
500 	/* could be moved to share CE3 */
501 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },
502 	/* target->host WMI */
503 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL, },
504 	/* host->target WMI */
505 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL, },
506 	/* host->target HTT */
507 	{ /* CE4 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0,
508 		CE_HTT_H2T_MSG_SRC_NENTRIES_AR900B, 256, 0, NULL, },
509 #ifdef WLAN_FEATURE_FASTPATH
510 	/* target->host HTT messages */
511 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },
512 #else   /* WLAN_FEATURE_FASTPATH */
513 	/* unused */
514 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
515 #endif  /* WLAN_FEATURE_FASTPATH */
516 	/* Target autonomous HIF_memcpy */
517 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
518 	/* ce_diag, the Diagnostic Window */
519 	{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL, },
520 	/* target->host pktlog */
521 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL, },
522 	/* Target autonomous HIF_memcpy */
523 	{ /* CE9 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
524 	/* Target autonomous HIF_memcpy */
525 	{ /* CE10 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
526 	/* Target autonomous HIF_memcpy */
527 	{ /* CE11 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
528 };
529 
530 static struct CE_attr host_lowdesc_ce_cfg_wlan_ar9888[] = {
531 	/* host->target HTC control and raw streams */
532 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL, },
533 	/* could be moved to share CE3 */
534 #ifdef WLAN_FEATURE_FASTPATH
535 	/* target->host BMI + HTC control */
536 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0, 512, 64, NULL, },
537 #else
538 	/* target->host BMI + HTC control */
539 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },
540 #endif
541 	/* target->host WMI */
542 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL, },
543 	/* host->target WMI */
544 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL, },
545 	/* host->target HTT */
546 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0,
547 		CE_HTT_H2T_MSG_SRC_NENTRIES_AR900B, 256, 0, NULL, },
548 #ifdef WLAN_FEATURE_FASTPATH
549 	/* target->host HTT messages */
550 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },
551 #else   /* WLAN_FEATURE_FASTPATH */
552 	/* unused */
553 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
554 #endif  /* WLAN_FEATURE_FASTPATH */
555 	/* Target autonomous HIF_memcpy */
556 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
557 	/* ce_diag, the Diagnostic Window */
558 	{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL, },
559 	/* Target autonomous HIF_memcpy */
560 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
561 };
562 
563 static struct CE_attr host_lowdesc_ce_cfg_wlan_ar900b[] = {
564 	/* host->target HTC control and raw streams */
565 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL, },
566 	/* could be moved to share CE3 */
567 #ifdef WLAN_FEATURE_FASTPATH
568 	/* target->host BMI + HTC control */
569 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0, 512, 64, NULL, },
570 #else
571 	/* target->host BMI + HTC control */
572 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },
573 #endif
574 	/* target->host WMI */
575 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL, },
576 	/* host->target WMI */
577 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL, },
578 	/* host->target HTT */
579 	{ /* CE4 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0,
580 		CE_HTT_H2T_MSG_SRC_NENTRIES_AR900B, 256, 0, NULL, },
581 #ifdef WLAN_FEATURE_FASTPATH
582 	/* target->host HTT messages */
583 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },
584 #else   /* WLAN_FEATURE_FASTPATH */
585 	/* unused */
586 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
587 #endif  /* WLAN_FEATURE_FASTPATH */
588 	/* Target autonomous HIF_memcpy */
589 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
590 	/* ce_diag, the Diagnostic Window */
591 	{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL, },
592 	/* target->host pktlog */
593 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL, },
594 	/* Target autonomous HIF_memcpy */
595 	{ /* CE9 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
596 	/* Target autonomous HIF_memcpy */
597 	{ /* CE10 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
598 	/* Target autonomous HIF_memcpy */
599 	{ /* CE11 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
600 };
601 
602 static struct CE_attr host_lowdesc_ce_cfg_wlan_ar900b_nopktlog[] = {
603 	/* host->target HTC control and raw streams */
604 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL, },
605 	/* could be moved to share CE3 */
606 #ifdef WLAN_FEATURE_FASTPATH
607 	/* target->host BMI + HTC control */
608 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0, 512, 64, NULL, },
609 #else
610 	/* target->host BMI + HTC control */
611 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },
612 #endif
613 	/* target->host WMI */
614 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL, },
615 	/* host->target WMI */
616 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL, },
617 	/* host->target HTT */
618 	{ /* CE4 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0,
619 		CE_HTT_H2T_MSG_SRC_NENTRIES_AR900B, 256, 0, NULL, },
620 #ifdef WLAN_FEATURE_FASTPATH
621 	/* target->host HTT messages */
622 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },
623 #else   /* WLAN_FEATURE_FASTPATH */
624 	/* unused */
625 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
626 #endif  /* WLAN_FEATURE_FASTPATH */
627 	/* Target autonomous HIF_memcpy */
628 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
629 	/* ce_diag, the Diagnostic Window */
630 	{ /* CE7 */ CE_ATTR_DIAG_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL, },
631 	/* target->host pktlog */
632 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
633 	/* Target autonomous HIF_memcpy */
634 	{ /* CE9 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
635 	/* Target autonomous HIF_memcpy */
636 	{ /* CE10 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
637 	/* Target autonomous HIF_memcpy */
638 	{ /* CE11 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, },
639 };
640 
641 static struct CE_pipe_config target_ce_config_wlan_ar9888[] = {
642 	/* host->target HTC control and raw streams */
643 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 256, CE_ATTR_FLAGS, 0, },
644 	/* target->host HTC control */
645 	{ /* CE1 */ 1, PIPEDIR_IN, 32, 512, CE_ATTR_FLAGS, 0, },
646 	/* target->host WMI */
647 	{ /* CE2 */ 2, PIPEDIR_IN, 64, 2048, CE_ATTR_FLAGS, 0, },
648 	/* host->target WMI */
649 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0, },
650 	/* host->target HTT */
651 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE4_COMP_HTT_HTC, 0, },
652 	/* NB: 50% of src nentries, since tx has 2 frags */
653 #ifdef WLAN_FEATURE_FASTPATH
654 	/* target->host HTT */
655 	{ /* CE5 */ 5, PIPEDIR_IN, 32, 512, CE_ATTR_FLAGS, 0, },
656 #else
657 	/* unused */
658 	{ /* CE5 */ 5, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0, },
659 #endif
660 	/* Reserved for target autonomous HIF_memcpy */
661 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 4096, CE_ATTR_FLAGS, 0, },
662 	/* CE7 used only by Host */
663 };
664 
665 static struct CE_pipe_config target_ce_config_wlan_ar900b[] = {
666 	/* host->target HTC control and raw streams */
667 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 256, CE_ATTR_FLAGS, 0, },
668 	/* target->host HTC control */
669 	{ /* CE1 */ 1, PIPEDIR_IN, 32, 512, CE_ATTR_FLAGS, 0, },
670 	/* target->host WMI */
671 	{ /* CE2 */ 2, PIPEDIR_IN, 64, 2048, CE_ATTR_FLAGS, 0, },
672 	/* host->target WMI */
673 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0, },
674 	/* host->target HTT */
675 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE_ATTR_FLAGS, 0, },
676 	/* NB: 50% of src nentries, since tx has 2 frags */
677 #ifdef WLAN_FEATURE_FASTPATH
678 	/* target->host HTT */
679 	{ /* CE5 */ 5, PIPEDIR_IN, 32, 512, CE_ATTR_FLAGS, 0, },
680 #else
681 	/* unused */
682 	{ /* CE5 */ 5, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0, },
683 #endif
684 	/* Reserved for target autonomous HIF_memcpy */
685 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 4096, CE_ATTR_FLAGS, 0, },
686 	/* CE7 used only by Host */
687 	{ /* CE7 */ 7, PIPEDIR_INOUT, 0, 0, 0, 0, },
688 	{ /* CE8 */ 8, PIPEDIR_IN, 64, 2048, CE_ATTR_FLAGS
689 		/* target->host packtlog */
690 		| CE_ATTR_DISABLE_INTR, 0, },
691 #if PEER_CACHEING_HOST_ENABLE
692 	/* target autonomous qcache memcpy */
693 	{ /* CE9 */ 9, PIPEDIR_INOUT, 32, 2048, CE_ATTR_FLAGS |
694 		CE_ATTR_DISABLE_INTR, 0, },
695 #endif
696 };
697 
698 static struct CE_attr host_ce_config_wlan_qca8074[] = {
699 	/* host->target HTC control and raw streams */
700 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
701 	/* target->host HTT + HTC control */
702 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
703 	/* target->host WMI */
704 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
705 	/* host->target WMI (mac0) */
706 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
707 	/* host->target HTT */
708 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0,
709 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
710 	/* target -> host PKTLOG */
711 #ifdef REMOVE_PKT_LOG
712 	{ /* CE5 */ 0, 0, 0, 0, 0, NULL,},
713 #else
714 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
715 #endif
716 	/* Target autonomous HIF_memcpy */
717 	{ /* CE6 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0, 0,
718 		0, 0, NULL,},
719 	/* host->target WMI (mac1) */
720 	{ /* CE7 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
721 	/* Target to uMC */
722 	{ /* CE8 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0, 0, 0, 0, NULL,},
723 	/* host->target WMI (mac2) */
724 	{ /* CE9 */ CE_ATTR_FLAGS, 0, 32,  2048, 0, NULL,},
725 	/* target->host HTT */
726 	{ /* CE10 unused */ 0, 0, 0, 0, 0, NULL,},
727 	{ /* CE11 unused */ 0, 0, 0, 0, 0, NULL,},
728 };
729 
730 #if defined(QCA_LOWMEM_CONFIG) || defined(QCA_512M_CONFIG)
731 #define T2H_WMI_RING_SIZE 32
732 #else
733 #define T2H_WMI_RING_SIZE 512
734 #endif
735 static struct CE_pipe_config target_ce_config_wlan_qca8074[] = {
736 	/* host->target HTC control and raw streams */
737 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
738 	/* target->host HTT */
739 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
740 	/* target->host WMI  + HTC control */
741 	{ /* CE2 */ 2, PIPEDIR_IN,  T2H_WMI_RING_SIZE, 2048, CE_ATTR_FLAGS, 0,},
742 	/* host->target WMI */
743 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
744 	/* host->target HTT */
745 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE4_COMP_HTT_HTC, 0,},
746 	/* NB: 50% of src nentries, since tx has 2 frags */
747 	/* Target -> host PKTLOG */
748 #ifdef REMOVE_PKT_LOG
749 	{ /* CE5 */ 5, PIPEDIR_NONE,  0, 0, 0, 0,},
750 #else
751 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, 0, 0,},
752 #endif
753 	/* Reserved for target autonomous HIF_memcpy */
754 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 65535, 64, 0,},
755 	/* CE7 used only by Host */
756 	{ /* CE7 */ 7, PIPEDIR_OUT, 32, 2048,
757 		8192, 0,},
758 	/* CE8 used only by IPA */
759 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 65535, 112, 0,},
760 	/* CE9 target->host HTT */
761 	{ /* CE9 */ 9, PIPEDIR_OUT,  32, 2048, 8192, 0,},
762 	/* CE10 target->host HTT */
763 	{/* CE10 unused */10, PIPEDIR_NONE, 0, 0, 0, 0,},
764 	{/* CE11 unused */11, PIPEDIR_NONE, 0, 0, 0, 0,},
765 };
766 
767 static struct CE_attr host_ce_config_wlan_qca8074_pci[] = {
768 	/* host->target HTC control and raw streams */
769 	{ /* CE0 */ EPPING_CE_FLAGS_POLL, 0, 16, 2048, 0, NULL,},
770 	/* target->host HTT + HTC control */
771 	{ /* CE1 */ EPPING_CE_FLAGS_POLL, 0, 0,  2048, 512, NULL,},
772 	/* target->host WMI */
773 	{ /* CE2 */ EPPING_CE_FLAGS_POLL, 0, 0,  2048, 256, NULL,},
774 	/* host->target WMI (mac0) */
775 	{ /* CE3 */ EPPING_CE_FLAGS_POLL, 0, 32, 2048, 0, NULL,},
776 	/* host->target HTT */
777 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0,
778 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
779 	/* target -> host PKTLOG */
780 #ifdef REMOVE_PKT_LOG
781 	{ /* CE5 */ 0, 0, 0, 0, 0, NULL,},
782 #else
783 	{ /* CE5 */ EPPING_CE_FLAGS_POLL, 0, 0, 2048, 512, NULL,},
784 #endif
785 	/* Target autonomous HIF_memcpy */
786 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
787 	/* host->target WMI (mac1) */
788 	{ /* CE7 */ EPPING_CE_FLAGS_POLL, 0, 32, 2048, 0, NULL,},
789 	/* Target to uMC */
790 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
791 	/* host->target WMI (mac2) */
792 	{ /* CE9 */ EPPING_CE_FLAGS_POLL, 0, 32,  2048, 0, NULL,},
793 	/* target->host HTT */
794 	{ /* CE10 unused */ 0, 0, 0, 0, 0, NULL,},
795 	{ /* CE11 unused */ 0, 0, 0, 0, 0, NULL,},
796 };
797 
798 static struct CE_pipe_config target_ce_config_wlan_qca8074_pci[] = {
799 	/* host->target HTC control and raw streams */
800 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
801 	/* target->host HTT */
802 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
803 	/* target->host WMI  + HTC control */
804 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
805 	/* host->target WMI */
806 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
807 	/* host->target HTT */
808 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE4_COMP_HTT_HTC, 0,},
809 	/* NB: 50% of src nentries, since tx has 2 frags */
810 	/* ipa_uc->target */
811 	{ /* CE5 */ 5, PIPEDIR_OUT, 1024,   64,
812 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
813 	/* Reserved for target autonomous HIF_memcpy */
814 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
815 	/* CE7 used only by Host */
816 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
817 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
818 	/* CE8 used only by IPA */
819 	{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
820 	/* CE9 target->host HTT */
821 	{ /* CE9 */ 9, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
822 	/* CE10 target->host HTT */
823 	{ /* CE10 */ 10, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
824 	/* Target -> host PKTLOG */
825 	{ /* CE11 */ 11, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
826 };
827 
828 static struct CE_attr host_ce_config_wlan_qca9574[] = {
829 	/* host->target HTC control and raw streams */
830 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
831 	/* target->host HTT + HTC control */
832 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
833 	/* target->host WMI */
834 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
835 	/* host->target WMI (mac0) */
836 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
837 	/* host->target HTT */
838 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0,
839 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
840 	/* target -> host PKTLOG */
841 #ifdef REMOVE_PKT_LOG
842 	{ /* CE5 */ 0, 0, 0, 0, 0, NULL,},
843 #else
844 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
845 #endif
846 	/* Target autonomous HIF_memcpy */
847 	{ /* CE6 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0, 0,
848 		0, 0, NULL,},
849 	/* host->target WMI (mac1) */
850 	{ /* CE7 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
851 	/* Target to uMC */
852 	{ /* CE8 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0, 0, 0, 0, NULL,},
853 	/* host->target WMI (mac2) */
854 	{ /* CE9 */ CE_ATTR_FLAGS, 0, 32,  2048, 0, NULL,},
855 	/* target->host HTT */
856 	{ /* CE10 unused */ 0, 0, 0, 0, 0, NULL,},
857 	{ /* CE11 unused */ 0, 0, 0, 0, 0, NULL,},
858 };
859 
860 static struct CE_pipe_config target_ce_config_wlan_qca9574[] = {
861 	/* host->target HTC control and raw streams */
862 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
863 	/* target->host HTT */
864 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
865 	/* target->host WMI  + HTC control */
866 	{ /* CE2 */ 2, PIPEDIR_IN,  T2H_WMI_RING_SIZE, 2048, CE_ATTR_FLAGS, 0,},
867 	/* host->target WMI */
868 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
869 	/* host->target HTT */
870 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE4_COMP_HTT_HTC, 0,},
871 	/* NB: 50% of src nentries, since tx has 2 frags */
872 	/* Target -> host PKTLOG */
873 #ifdef REMOVE_PKT_LOG
874 	{ /* CE5 */ 5, PIPEDIR_NONE,  0, 0, 0, 0,},
875 #else
876 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, 0, 0,},
877 #endif
878 	/* Reserved for target autonomous HIF_memcpy */
879 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 65535, 64, 0,},
880 	/* CE7 used only by Host */
881 	{ /* CE7 */ 7, PIPEDIR_OUT, 32, 2048,
882 		8192, 0,},
883 	/* CE8 used only by IPA */
884 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 65535, 112, 0,},
885 	/* CE9 target->host HTT */
886 	{ /* CE9 */ 9, PIPEDIR_OUT,  32, 2048, 8192, 0,},
887 	/* CE10 target->host HTT */
888 	{/* CE10 unused */10, PIPEDIR_NONE, 0, 0, 0, 0,},
889 	{/* CE11 unused */11, PIPEDIR_NONE, 0, 0, 0, 0,},
890 };
891 
892 static struct CE_attr host_lowdesc_ce_config_wlan_adrastea_nopktlog[] = {
893 	/* host->target HTC control and raw streams */
894 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
895 	/* target->host HTT + HTC control */
896 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 256, NULL,},
897 	/* target->host WMI */
898 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  2048, 64, NULL,},
899 	/* host->target WMI */
900 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
901 	/* host->target HTT */
902 	{ /* CE4 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
903 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
904 	/* ipa_uc->target HTC control */
905 	{ /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
906 		CE_HTT_H2T_MSG_SRC_NENTRIES, 512, 0, NULL,},
907 	/* Target autonomous HIF_memcpy */
908 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
909 	/* ce_diag, the Diagnostic Window */
910 	{ /* CE7 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
911 	/* Target to uMC */
912 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
913 	/* target->host HTT */
914 	{ /* CE9 */ CE_ATTR_FLAGS, 0, 0,  2048, 64, NULL,},
915 	/* target->host HTT */
916 	{ /* CE10 */ CE_ATTR_FLAGS, 0, 0,  2048, 64, NULL,},
917 	/* target -> host PKTLOG */
918 	{ /* CE11 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
919 		0, 2048, 0, NULL,},
920 };
921 
922 static struct CE_attr host_ce_config_wlan_adrastea[] = {
923 	/* host->target HTC control and raw streams */
924 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
925 	/* target->host HTT + HTC control */
926 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
927 	/* target->host WMI */
928 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  2048, 128, NULL,},
929 	/* host->target WMI */
930 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
931 	/* host->target HTT */
932 	{ /* CE4 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
933 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
934 	/* ipa_uc->target HTC control */
935 	{ /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
936 		CE_HTT_H2T_MSG_SRC_NENTRIES, 512, 0, NULL,},
937 	/* Target autonomous HIF_memcpy */
938 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
939 	/* ce_diag, the Diagnostic Window */
940 	{ /* CE7 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
941 	/* Target to uMC */
942 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
943 	/* target->host HTT */
944 	{ /* CE9 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
945 	/* target->host HTT */
946 	{ /* CE10 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
947 	/* target -> host PKTLOG */
948 	{ /* CE11 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
949 };
950 
951 static struct CE_pipe_config
952 	target_lowdesc_ce_config_wlan_adrastea_nopktlog[] = {
953 	/* host->target HTC control and raw streams */
954 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
955 	/* target->host HTT */
956 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
957 	/* target->host WMI  + HTC control */
958 	{ /* CE2 */ 2, PIPEDIR_IN,  64, 2048, CE_ATTR_FLAGS, 0,},
959 	/* host->target WMI */
960 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
961 	/* host->target HTT */
962 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
963 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
964 	/* NB: 50% of src nentries, since tx has 2 frags */
965 	/* ipa_uc->target */
966 	{ /* CE5 */ 5, PIPEDIR_OUT, 1024,   64,
967 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
968 	/* Reserved for target autonomous HIF_memcpy */
969 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
970 	/* CE7 used only by Host */
971 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
972 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
973 	/* CE8 used only by IPA */
974 	{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
975 	/* CE9 target->host HTT */
976 	{ /* CE9 */ 9, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
977 	/* CE10 target->host HTT */
978 	{ /* CE10 */ 10, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
979 	/* Target -> host PKTLOG */
980 	{ /* CE11 */ 11, PIPEDIR_IN,  32, 2048,
981 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
982 };
983 
984 static struct CE_pipe_config target_ce_config_wlan_adrastea[] = {
985 	/* host->target HTC control and raw streams */
986 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
987 	/* target->host HTT */
988 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
989 	/* target->host WMI  + HTC control */
990 	{ /* CE2 */ 2, PIPEDIR_IN,  64, 2048, CE_ATTR_FLAGS, 0,},
991 	/* host->target WMI */
992 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
993 	/* host->target HTT */
994 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
995 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
996 	/* NB: 50% of src nentries, since tx has 2 frags */
997 	/* ipa_uc->target */
998 	{ /* CE5 */ 5, PIPEDIR_OUT, 1024,   64,
999 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1000 	/* Reserved for target autonomous HIF_memcpy */
1001 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1002 	/* CE7 used only by Host */
1003 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
1004 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1005 	/* CE8 used only by IPA */
1006 	{ /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
1007 	/* CE9 target->host HTT */
1008 	{ /* CE9 */ 9, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1009 	/* CE10 target->host HTT */
1010 	{ /* CE10 */ 10, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1011 	/* Target -> host PKTLOG */
1012 	{ /* CE11 */ 11, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1013 };
1014 
1015 #define QCN_6122_CE_COUNT 6
1016 static struct CE_attr host_ce_config_wlan_qcn6122[] = {
1017 	/* host->target HTC control and raw streams */
1018 	{/*CE0*/ (CE_ATTR_FLAGS), 0, 16, 2048, 0, NULL,},
1019 	/* target->host HTT + HTC control */
1020 	{/*CE1*/ (CE_ATTR_FLAGS), 0, 0,  2048,
1021 		512, NULL,},
1022 	/* target->host WMI */
1023 	{/*CE2*/ (CE_ATTR_FLAGS), 0, 0,  WMI_CE_BUF_SIZE,
1024 		128, NULL,},
1025 	/* host->target WMI */
1026 	{/*CE3*/ (CE_ATTR_FLAGS), 0, 32, WMI_CE_BUF_SIZE, 0, NULL,},
1027 	/* host->target HTT */
1028 	{/*CE4*/ CE4_COMP_HTT_HTC, 0,
1029 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1030 	/* target -> host PKTLOG */
1031 	{/*CE5*/ (CE_ATTR_FLAGS), 0, 0, 2048,
1032 		512, NULL,},
1033 	/* Target autonomous HIF_memcpy */
1034 	{/*CE6*/ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1035 	/* host->target WMI (mac1) */
1036 	{/*CE7*/ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1037 	/* Reserved for target */
1038 	{/*CE8*/ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1039 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1040 };
1041 
1042 static struct CE_pipe_config target_ce_config_wlan_qcn6122[] = {
1043 	/* host->target HTC control and raw streams */
1044 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1045 	/* target->host HTT */
1046 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1047 	/* target->host WMI  + HTC control */
1048 	{ /* CE2 */ 2, PIPEDIR_IN,  32, WMI_CE_BUF_SIZE, CE_ATTR_FLAGS, 0,},
1049 	/* host->target WMI */
1050 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, WMI_CE_BUF_SIZE, CE_ATTR_FLAGS, 0,},
1051 	/* host->target HTT */
1052 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE4_COMP_HTT_HTC, 0,},
1053 	/* Target -> host PKTLOG */
1054 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1055 	/* Reserved for target autonomous HIF_memcpy */
1056 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1057 	/* CE7 used only by Host */
1058 	{ /* CE7 */ 7, PIPEDIR_OUT, 32, 2048,
1059 		8192, 0,},
1060 	/* Reserved for target */
1061 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1062 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1063 };
1064 
1065 #define QCN_9160_CE_COUNT 6
1066 static struct CE_attr host_ce_config_wlan_qcn9160[] = {
1067 	/* host->target HTC control and raw streams */
1068 	{/*CE0*/ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
1069 	/* target->host HTT + HTC control */
1070 	{/*CE1*/ (CE_ATTR_FLAGS), 0, 0,  2048,
1071 		512, NULL,},
1072 	/* target->host WMI */
1073 	{/*CE2*/ (CE_ATTR_FLAGS), 0, 0,  WMI_CE_BUF_SIZE,
1074 		128, NULL,},
1075 	/* host->target WMI */
1076 	{/*CE3*/ (CE_ATTR_FLAGS), 0, 32, WMI_CE_BUF_SIZE, 0, NULL,},
1077 	/* host->target HTT */
1078 	{/*CE4*/ CE4_COMP_HTT_HTC, 0,
1079 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1080 	/* target -> host PKTLOG */
1081 	{/*CE5*/ (CE_ATTR_FLAGS), 0, 0, 2048,
1082 		512, NULL,},
1083 	/* Target autonomous HIF_memcpy */
1084 	{/*CE6*/ (CE_ATTR_FLAGS), 0, 0, 0, 0, NULL,},
1085 	/* host->target WMI (mac1) */
1086 	{/*CE7*/ (CE_ATTR_FLAGS), 0, 0, 0, 0, NULL,},
1087 	/* Reserved for target */
1088 	{/*CE8*/ (CE_ATTR_FLAGS), 0, 0, 0, 0, NULL,},
1089 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1090 };
1091 
1092 static struct CE_pipe_config target_ce_config_wlan_qcn9160[] = {
1093 	/* host->target HTC control and raw streams */
1094 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1095 	/* target->host HTT */
1096 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1097 	/* target->host WMI  + HTC control */
1098 	{ /* CE2 */ 2, PIPEDIR_IN,  32, WMI_CE_BUF_SIZE, CE_ATTR_FLAGS, 0,},
1099 	/* host->target WMI */
1100 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, WMI_CE_BUF_SIZE, CE_ATTR_FLAGS, 0,},
1101 	/* host->target HTT */
1102 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE4_COMP_HTT_HTC, 0,},
1103 	/* Target -> host PKTLOG */
1104 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1105 	/* Reserved for target autonomous HIF_memcpy */
1106 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1107 	/* CE7 used only by Host */
1108 	{ /* CE7 */ 7, PIPEDIR_OUT, 32, 2048,
1109 		8192, 0,},
1110 	/* Reserved for target */
1111 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1112 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1113 };
1114 
1115 #ifdef QCA_LOWMEM_CONFIG
1116 #define PKTLOG_DST_ENTRIES 128
1117 #else
1118 #define PKTLOG_DST_ENTRIES 512
1119 #endif
1120 
1121 #define QCN_6432_CE_COUNT 12
1122 /* Interrupt mode */
1123 static struct CE_attr host_ce_config_wlan_qcn6432[] = {
1124 	/* host->target HTC control and raw streams */
1125 	{/*CE0*/ (CE_ATTR_FLAGS), 0, 16, 2048, 0, NULL,},
1126 	/* target->host HTT + HTC control */
1127 	{/*CE1*/ (CE_ATTR_FLAGS), 0, 0,  2048, 512, NULL,},
1128 	/* target->host WMI */
1129 	{/*CE2*/ (CE_ATTR_FLAGS), 0, 0,  2048, 128, NULL,},
1130 	/* host->target WMI */
1131 	{/*CE3*/ (CE_ATTR_FLAGS), 0, 32, 2048, 0, NULL,},
1132 	/* host->target HTT */
1133 	{/*CE4*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1134 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1135 	/* target -> host PKTLOG */
1136 	#ifdef REMOVE_PKT_LOG
1137 	{ /* CE5 */ 0, 0, 0, 0, 0, NULL,},
1138 	#else
1139 	{/*CE5*/ (CE_ATTR_FLAGS), 0, 0, 2048, PKTLOG_DST_ENTRIES, NULL,},
1140 	#endif
1141 	/* Target autonomous HIF_memcpy */
1142 	{/*CE6*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1143 	/* CV Prefetch */
1144 	{/*CE7*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1145 	/* Target HIF memcpy (Generic HIF memcypy) */
1146 	{/*CE8*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1147 #ifdef WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE
1148 	/* WMI logging/CFR/Spectral/Radar/ */
1149 	{/*CE9*/ (CE_ATTR_FLAGS), 0, 0, 2048, 128, NULL,},
1150 #else
1151 	{/*CE9*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1152 #endif
1153 	/* Customer reserve */
1154 	{/*CE10*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1155 	/* Un-assigned */
1156 	{/*CE11*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1157 };
1158 
1159 static struct CE_pipe_config target_ce_config_wlan_qcn6432[] = {
1160 	/* host->target HTC control and raw streams */
1161 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1162 	/* target->host HTT */
1163 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1164 	/* target->host WMI  + HTC control */
1165 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1166 	/* host->target WMI */
1167 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1168 	/* host->target HTT */
1169 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
1170 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1171 	/* Target -> host PKTLOG */
1172 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1173 	/* Reserved for target autonomous HIF_memcpy */
1174 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1175 	/* CE7 Reserved for CV Prefetch */
1176 	{ /* CE7 */ 7, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1177 	/* CE8 Reserved for target generic HIF memcpy */
1178 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1179 #ifdef WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE
1180 	/* WMI logging/CFR/Spectral/Radar/ */
1181 	{ /* CE9 */ 9, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
1182 #else
1183 	{/* CE9 unused */9, PIPEDIR_NONE, 0, 0, 0, 0,},
1184 #endif
1185 	/* CE 10,11 to be defined */
1186 	{/* CE11 unused */10, PIPEDIR_NONE, 0, 0, 0, 0,},
1187 	{/* CE11 unused */11, PIPEDIR_NONE, 0, 0, 0, 0,},
1188 };
1189 
1190 #define QCA_5332_CE_COUNT 12
1191 static struct CE_attr host_ce_config_wlan_qca5332[] = {
1192 	/* host->target HTC control and raw streams */
1193 	{/*CE0*/ (CE_ATTR_FLAGS), 0, 16, 2048, 0, NULL,},
1194 	/* target->host HTT + HTC control */
1195 	{/*CE1*/ (CE_ATTR_FLAGS), 0, 0,  2048, 512, NULL,},
1196 	/* target->host WMI */
1197 	{/*CE2*/ (CE_ATTR_FLAGS), 0, 0,  2048, 128, NULL,},
1198 	/* host->target WMI */
1199 	{/*CE3*/ (CE_ATTR_FLAGS), 0, 32, 2048, 0, NULL,},
1200 	/* host->target HTT */
1201 	{/*CE4*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1202 			CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1203 	/* target -> host PKTLOG */
1204 	#ifdef REMOVE_PKT_LOG
1205 	{ /* CE5 */ 0, 0, 0, 0, 0, NULL,},
1206 	#else
1207 	{/*CE5*/ (CE_ATTR_FLAGS), 0, 0, 2048, PKTLOG_DST_ENTRIES, NULL,},
1208 	#endif
1209 	/* Target autonomous HIF_memcpy */
1210 	{/*CE6*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1211 	/* CV Prefetch */
1212 	{/*CE7*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1213 	/* Target HIF memcpy (Generic HIF memcypy) */
1214 	{/*CE8*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1215 #ifdef WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE
1216 	/* WMI logging/CFR/Spectral/Radar/ */
1217 	{/*CE9*/ (CE_ATTR_FLAGS), 0, 0, 2048, 128, NULL,},
1218 #else
1219 	{/*CE9*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1220 #endif
1221 	/* Customer reserve */
1222 	{/*CE10*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1223 	/* Un-assigned */
1224 	{/*CE11*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1225 };
1226 
1227 static struct CE_pipe_config target_ce_config_wlan_qca5332[] = {
1228 	/* host->target HTC control and raw streams */
1229 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1230 	/* target->host HTT */
1231 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1232 	/* target->host WMI  + HTC control */
1233 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1234 	/* host->target WMI */
1235 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1236 	/* host->target HTT */
1237 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
1238 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1239 	/* Target -> host PKTLOG */
1240 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1241 	/* Reserved for target autonomous HIF_memcpy */
1242 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1243 	/* CE7 Reserved for CV Prefetch */
1244 	{ /* CE7 */ 7, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1245 	/* CE8 Reserved for target generic HIF memcpy */
1246 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1247 #ifdef WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE
1248 	/* WMI logging/CFR/Spectral/Radar/ */
1249 	{ /* CE9 */ 9, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
1250 #else
1251 	{/* CE9 unused */9, PIPEDIR_NONE, 0, 0, 0, 0,},
1252 #endif
1253 	/* CE 10,11 to be defined */
1254 	{/* CE11 unused */10, PIPEDIR_NONE, 0, 0, 0, 0,},
1255 	{/* CE11 unused */11, PIPEDIR_NONE, 0, 0, 0, 0,},
1256 };
1257 
1258 #define QCA_5018_CE_COUNT 6
1259 static struct CE_attr host_ce_config_wlan_qca5018[] = {
1260 	/* host->target HTC control and raw streams */
1261 	{/*CE0*/ (CE_ATTR_FLAGS), 0, 16, 2048, 0, NULL,},
1262 	/* target->host HTT + HTC control */
1263 	{/*CE1*/ (CE_ATTR_FLAGS), 0, 0,  2048,
1264 		512, NULL,},
1265 	/* target->host WMI */
1266 	{/*CE2*/ (CE_ATTR_FLAGS), 0, 0,  2048,
1267 		128, NULL,},
1268 	/* host->target WMI */
1269 	{/*CE3*/ (CE_ATTR_FLAGS), 0, 32, 2048, 0, NULL,},
1270 	/* host->target HTT */
1271 	{/*CE4*/ CE4_COMP_HTT_HTC, 0,
1272 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1273 	/* target -> host PKTLOG */
1274 #ifdef REMOVE_PKT_LOG
1275 	{ /* CE5 */ 0, 0, 0, 0, 0, NULL,},
1276 #else
1277 	{/*CE5*/ (CE_ATTR_FLAGS), 0, 0, 2048,
1278 		PKTLOG_DST_ENTRIES, NULL,},
1279 #endif
1280 	/* Target autonomous HIF_memcpy */
1281 	{/*CE6*/ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1282 	/* host->target WMI (mac1) */
1283 	{/*CE7*/ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1284 	/* Reserved for target */
1285 	{/*CE8*/ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1286 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1287 };
1288 
1289 static struct CE_pipe_config target_ce_config_wlan_qca5018[] = {
1290 	/* host->target HTC control and raw streams */
1291 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1292 	/* target->host HTT */
1293 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1294 	/* target->host WMI  + HTC control */
1295 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1296 	/* host->target WMI */
1297 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1298 	/* host->target HTT */
1299 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE4_COMP_HTT_HTC, 0,},
1300 	/* Target -> host PKTLOG */
1301 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1302 	/* Reserved for target autonomous HIF_memcpy */
1303 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1304 	/* CE7 used only by Host */
1305 	{ /* CE7 */ 7, PIPEDIR_OUT, 32, 2048,
1306 		8192, 0,},
1307 	/* Reserved for target */
1308 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1309 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1310 };
1311 
1312 #define QCN_9000_CE_COUNT 6
1313 
1314 /* QCN9000 enable polling mode */
1315 static struct CE_attr host_ce_config_wlan_qcn9000[] = {
1316 	/* host->target HTC control and raw streams */
1317 	{/*CE0*/ (CE_ATTR_FLAGS), 0, 16, 2048, 0, NULL,},
1318 	/* target->host HTT + HTC control */
1319 	{/*CE1*/ (CE_ATTR_FLAGS), 0, 0,  2048,
1320 		512, NULL,},
1321 	/* target->host WMI */
1322 	{/*CE2*/ (CE_ATTR_FLAGS), 0, 0,  WMI_CE_BUF_SIZE,
1323 		128, NULL,},
1324 	/* host->target WMI */
1325 	{/*CE3*/ (CE_ATTR_FLAGS), 0, 32, WMI_CE_BUF_SIZE, 0, NULL,},
1326 	/* host->target HTT */
1327 	{/*CE4*/ CE4_COMP_HTT_HTC, 0,
1328 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1329 	/* target -> host PKTLOG */
1330 #ifdef REMOVE_PKT_LOG
1331 	{ /* CE5 */ 0, 0, 0, 0, 0, NULL,},
1332 #else
1333 	{/*CE5*/ (CE_ATTR_FLAGS), 0, 0, 2048,
1334 		PKTLOG_DST_ENTRIES, NULL,},
1335 #endif
1336 	/* Target autonomous HIF_memcpy */
1337 	{/*CE6*/ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1338 	/* Target CV prefetch */
1339 	{/*CE7*/ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1340 	/* Reserved for target */
1341 	{/*CE8*/ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1342 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1343 };
1344 
1345 static struct CE_pipe_config target_ce_config_wlan_qcn9000[] = {
1346 	/* host->target HTC control and raw streams */
1347 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1348 	/* target->host HTT */
1349 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1350 	/* target->host WMI  + HTC control */
1351 	{ /* CE2 */ 2, PIPEDIR_IN,  32, WMI_CE_BUF_SIZE, CE_ATTR_FLAGS, 0,},
1352 	/* host->target WMI */
1353 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, WMI_CE_BUF_SIZE, CE_ATTR_FLAGS, 0,},
1354 	/* host->target HTT */
1355 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE4_COMP_HTT_HTC, 0,},
1356 	/* Target -> host PKTLOG */
1357 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1358 	/* Reserved for target autonomous HIF_memcpy */
1359 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1360 	/* Target CV prefetch */
1361 	{ /* CE7 */ 7, PIPEDIR_OUT, 32, 2048,
1362 		8192, 0,},
1363 	/* Reserved for target */
1364 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1365 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1366 };
1367 
1368 #define QCA_6290_CE_COUNT 9
1369 #ifdef QCA_6290_AP_MODE
1370 static struct CE_attr host_ce_config_wlan_qca6290[] = {
1371 	/* host->target HTC control and raw streams */
1372 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
1373 	/* target->host HTT + HTC control */
1374 	{ /* CE1 */ (CE_ATTR_FLAGS | CE_ATTR_ENABLE_POLL), 0, 0,  2048,
1375 		512, NULL,},
1376 	/* target->host WMI */
1377 	{ /* CE2 */ (CE_ATTR_FLAGS | CE_ATTR_ENABLE_POLL), 0, 0,  2048,
1378 		32, NULL,},
1379 	/* host->target WMI */
1380 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
1381 	/* host->target HTT */
1382 	{ /* CE4 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1383 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1384 	/* target -> host PKTLOG */
1385 	{ /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_ENABLE_POLL), 0, 0, 2048,
1386 		512, NULL,},
1387 	/* Target autonomous HIF_memcpy */
1388 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1389 	/* host->target WMI (mac1) */
1390 	{ /* CE7 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
1391 	/* Reserved for target */
1392 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1393 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1394 };
1395 
1396 static struct CE_pipe_config target_ce_config_wlan_qca6290[] = {
1397 	/* host->target HTC control and raw streams */
1398 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1399 	/* target->host HTT */
1400 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1401 	/* target->host WMI  + HTC control */
1402 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1403 	/* host->target WMI */
1404 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1405 	/* host->target HTT */
1406 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
1407 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1408 	/* Target -> host PKTLOG */
1409 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1410 	/* Reserved for target autonomous HIF_memcpy */
1411 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1412 	/* CE7 used only by Host */
1413 	{ /* CE7 */ 7, PIPEDIR_OUT, 32, 2048,
1414 		8192, 0,},
1415 	/* Reserved for target */
1416 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1417 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1418 };
1419 #else
1420 static struct CE_attr host_ce_config_wlan_qca6290[] = {
1421 	/* host->target HTC control and raw streams */
1422 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
1423 	/* target->host HTT + HTC control */
1424 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
1425 	/* target->host WMI */
1426 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  2048, 32, NULL,},
1427 	/* host->target WMI */
1428 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
1429 	/* host->target HTT */
1430 	{ /* CE4 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1431 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1432 	/* target -> host PKTLOG */
1433 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
1434 	/* Target autonomous HIF_memcpy */
1435 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1436 	/* ce_diag, the Diagnostic Window */
1437 	{ /* CE7 */ (CE_ATTR_DIAG_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1438 		2, DIAG_TRANSFER_LIMIT, 2, NULL,},
1439 	/* Reserved for target */
1440 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1441 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1442 };
1443 
1444 static struct CE_pipe_config target_ce_config_wlan_qca6290[] = {
1445 	/* host->target HTC control and raw streams */
1446 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1447 	/* target->host HTT */
1448 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1449 	/* target->host WMI  + HTC control */
1450 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1451 	/* host->target WMI */
1452 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1453 	/* host->target HTT */
1454 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
1455 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1456 	/* Target -> host PKTLOG */
1457 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1458 	/* Reserved for target autonomous HIF_memcpy */
1459 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1460 	/* CE7 used only by Host */
1461 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
1462 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1463 	/* Reserved for target */
1464 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1465 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1466 };
1467 #endif
1468 
1469 #define QCA_6390_CE_COUNT 9
1470 static struct CE_attr host_ce_config_wlan_qca6390[] = {
1471 	/* host->target HTC control and raw streams */
1472 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
1473 	/* target->host HTT + HTC control */
1474 #ifdef REMOVE_PKT_LOG
1475 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
1476 #else
1477 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 256, NULL,},
1478 #endif
1479 	/* target->host WMI */
1480 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  2048, 32, NULL,},
1481 	/* host->target WMI */
1482 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
1483 	/* host->target HTT */
1484 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0,
1485 		CE_HTT_H2T_MSG_SRC_NENTRIES_QCA6390, 256, 0, NULL,},
1486 	/* target -> host PKTLOG */
1487 #ifdef REMOVE_PKT_LOG
1488 	{ /* CE5 */ 0, 0, 0, 0, 0, NULL,},
1489 #else
1490 	{ /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 2048, 512,
1491 		NULL,},
1492 #endif
1493 	/* Target autonomous HIF_memcpy */
1494 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1495 	/* ce_diag, the Diagnostic Window */
1496 	{ /* CE7 */ (CE_ATTR_DIAG_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1497 		0, DIAG_TRANSFER_LIMIT, 0, NULL,},
1498 	/* Reserved for target */
1499 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1500 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1501 };
1502 
1503 static struct CE_pipe_config target_ce_config_wlan_qca6390[] = {
1504 	/* host->target HTC control and raw streams */
1505 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1506 	/* target->host HTT */
1507 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1508 	/* target->host WMI  + HTC control */
1509 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1510 	/* host->target WMI */
1511 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1512 	/* host->target HTT */
1513 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
1514 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1515 	/* Target -> host PKTLOG */
1516 #ifdef REMOVE_PKT_LOG
1517 	{ /* CE5 */ 5, PIPEDIR_IN,  2, 2048, CE_ATTR_FLAGS, 0,},
1518 #else
1519 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1520 #endif
1521 	/* Reserved for target autonomous HIF_memcpy */
1522 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1523 	/* CE7 used only by Host */
1524 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
1525 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1526 	/* Reserved for target */
1527 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1528 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1529 };
1530 
1531 #define QCA_6490_CE_COUNT 9
1532 static struct CE_attr host_ce_config_wlan_qca6490[] = {
1533 	/* host->target HTC control and raw streams */
1534 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
1535 	/* target->host HTT + HTC control */
1536 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
1537 	/* target->host WMI */
1538 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  3520, 64, NULL,},
1539 	/* host->target WMI */
1540 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 3520, 0, NULL,},
1541 	/* host->target HTT */
1542 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0,
1543 		CE_HTT_H2T_MSG_SRC_NENTRIES_QCA6490, 256, 0, NULL,},
1544 	/* target -> host PKTLOG */
1545 #ifdef REMOVE_PKT_LOG
1546 	{ /* CE5 */ 0, 0, 0, 0, 0, NULL,},
1547 #else
1548 	{ /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 2048, 512,
1549 		NULL,},
1550 #endif
1551 	/* Target autonomous HIF_memcpy */
1552 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1553 	/* ce_diag, the Diagnostic Window */
1554 	{ /* CE7 */ (CE_ATTR_DIAG_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1555 		0, DIAG_TRANSFER_LIMIT, 0, NULL,},
1556 	/* Reserved for target */
1557 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1558 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1559 };
1560 
1561 static struct CE_pipe_config target_ce_config_wlan_qca6490[] = {
1562 	/* host->target HTC control and raw streams */
1563 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1564 	/* target->host HTT */
1565 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1566 	/* target->host WMI  + HTC control */
1567 	{ /* CE2 */ 2, PIPEDIR_IN,  64, 3520, CE_ATTR_FLAGS, 0,},
1568 	/* host->target WMI */
1569 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 3520, CE_ATTR_FLAGS, 0,},
1570 	/* host->target HTT */
1571 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
1572 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1573 	/* Target -> host PKTLOG */
1574 #ifdef REMOVE_PKT_LOG
1575 	{ /* CE5 */ 5, PIPEDIR_IN,  2, 2048, CE_ATTR_FLAGS, 0,},
1576 #else
1577 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1578 #endif
1579 	/* Reserved for target autonomous HIF_memcpy */
1580 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1581 	/* CE7 used only by Host */
1582 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
1583 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1584 	/* Reserved for target */
1585 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1586 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1587 };
1588 
1589 #define QCA_6750_CE_COUNT 9
1590 static struct CE_attr host_ce_config_wlan_qca6750[] = {
1591 	/* host->target HTC control and raw streams */
1592 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
1593 	/* target->host HTT + HTC control */
1594 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 64, NULL,},
1595 	/* target->host WMI */
1596 	{ /* CE2 */ CE_ATTR_FLAGS | CE_ATTR_HI_TASKLET, 0, 0,  3520, 32, NULL,},
1597 	/* host->target WMI */
1598 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 3520, 0, NULL,},
1599 	/* host->target HTT */
1600 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0,
1601 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1602 	/* target -> host PKTLOG */
1603 #ifdef REMOVE_PKT_LOG
1604 	{ /* CE5 */ 0, 0, 0, 0, 0, NULL,},
1605 #else
1606 	{ /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 2048, 512,
1607 		NULL,},
1608 #endif
1609 	/* Target autonomous HIF_memcpy */
1610 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1611 #ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
1612 	/* target->host WMI_DIAG */
1613 	{ /* CE7 */ CE_ATTR_FLAGS, 0, 0,  2048, 32, NULL,},
1614 #else
1615 	/* ce_diag, the Diagnostic Window */
1616 	{ /* CE7 */ (CE_ATTR_DIAG_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1617 		0, DIAG_TRANSFER_LIMIT, 0, NULL,},
1618 #endif
1619 	/* Reserved for target */
1620 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1621 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1622 };
1623 
1624 static struct CE_pipe_config target_ce_config_wlan_qca6750[] = {
1625 	/* host->target HTC control and raw streams */
1626 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1627 	/* target->host HTT */
1628 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1629 	/* target->host WMI  + HTC control */
1630 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 3520, CE_ATTR_FLAGS, 0,},
1631 	/* host->target WMI */
1632 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 3520, CE_ATTR_FLAGS, 0,},
1633 	/* host->target HTT */
1634 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
1635 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1636 	/* Target -> host PKTLOG */
1637 #ifdef REMOVE_PKT_LOG
1638 	{ /* CE5 */ 5, PIPEDIR_IN,  2, 2048, CE_ATTR_FLAGS, 0,},
1639 #else
1640 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1641 #endif
1642 	/* Reserved for target autonomous HIF_memcpy */
1643 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1644 #ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
1645 	/* target->host WMI_DIAG */
1646 	{ /* CE7 */ 7, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
1647 #else
1648 	/* CE7 used only by Host */
1649 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
1650 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1651 #endif
1652 	/* Reserved for target */
1653 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1654 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1655 };
1656 
1657 #define KIWI_CE_COUNT 9
1658 #ifdef FEATURE_DIRECT_LINK
1659 static struct CE_attr host_ce_config_wlan_kiwi_direct_link[] = {
1660 	{ /* CE0 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 8, 2048, 0,
1661 	 NULL,},
1662 	/* target->host HTT + HTC control */
1663 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
1664 	/* target->host WMI */
1665 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  3520, 256, NULL,},
1666 	/* host->target WMI */
1667 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 3520, 0, NULL,},
1668 	/* host->target HTT, HTC control and raw streams */
1669 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0, 256, 256, 0, NULL,},
1670 #ifdef FEATURE_PKTLOG
1671 	/* target -> host PKTLOG */
1672 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
1673 #else
1674 	{ /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 256, 32,
1675 	 NULL,},
1676 #endif
1677 	/* Target autonomous HIF_memcpy */
1678 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1679 #ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
1680 	/* target->host WMI_DIAG */
1681 	{ /* CE7 */ CE_ATTR_FLAGS, 0, 0,  2048, 32, NULL,},
1682 #else
1683 	/* ce_diag, the Diagnostic Window */
1684 	{ /* CE7 */ (CE_ATTR_DIAG_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1685 		0, DIAG_TRANSFER_LIMIT, 0, NULL,},
1686 #endif
1687 	/* Reserved for target */
1688 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1689 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1690 };
1691 #endif
1692 
1693 static struct CE_attr host_ce_config_wlan_kiwi[] = {
1694 	/* host->target HTC control and raw streams */
1695 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
1696 	/* target->host HTT + HTC control */
1697 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
1698 	/* target->host WMI */
1699 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  3520, 256, NULL,},
1700 	/* host->target WMI */
1701 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 3520, 0, NULL,},
1702 	/* host->target HTT */
1703 	{ /* CE4 */ CE4_COMP_HTT_HTC, 0,
1704 		256, 256, 0, NULL,},
1705 #ifdef FEATURE_PKTLOG
1706 	/* target -> host PKTLOG */
1707 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
1708 #else
1709 	{ /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 0, NULL,},
1710 #endif
1711 	/* Target autonomous HIF_memcpy */
1712 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1713 #ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
1714 	/* target->host WMI_DIAG */
1715 	{ /* CE7 */ CE_ATTR_FLAGS, 0, 0,  2048, 32, NULL,},
1716 #else
1717 	/* ce_diag, the Diagnostic Window */
1718 	{ /* CE7 */ (CE_ATTR_DIAG_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1719 		0, DIAG_TRANSFER_LIMIT, 0, NULL,},
1720 #endif
1721 	/* Reserved for target */
1722 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1723 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1724 };
1725 
1726 #ifdef FEATURE_DIRECT_LINK
1727 static struct CE_pipe_config target_ce_config_wlan_kiwi_direct_link[] = {
1728 	{ /* CE0 */ 0, PIPEDIR_OUT, 8, 2048, CE_ATTR_FLAGS, 0,},
1729 	/* target->host HTT */
1730 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1731 	/* target->host WMI  + HTC control */
1732 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 3520, CE_ATTR_FLAGS, 0,},
1733 	/* host->target WMI */
1734 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 3520, CE_ATTR_FLAGS, 0,},
1735 	/* host->target HTT, HTC control and raw streams */
1736 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
1737 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1738 #ifdef FEATURE_PKTLOG
1739 	/* Target -> host PKTLOG */
1740 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1741 #else
1742 	{ /* CE5 */ 5, PIPEDIR_IN,  16, 256, CE_ATTR_FLAGS, 0,},
1743 #endif
1744 	/* Reserved for target autonomous HIF_memcpy */
1745 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1746 #ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
1747 	/* target->host WMI_DIAG */
1748 	{ /* CE7 */ 7, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
1749 #else
1750 	/* CE7 used only by Host */
1751 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
1752 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1753 #endif
1754 	/* Reserved for target */
1755 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1756 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1757 };
1758 #endif
1759 
1760 static struct CE_pipe_config target_ce_config_wlan_kiwi[] = {
1761 	/* host->target HTC control and raw streams */
1762 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1763 	/* target->host HTT */
1764 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1765 	/* target->host WMI  + HTC control */
1766 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 3520, CE_ATTR_FLAGS, 0,},
1767 	/* host->target WMI */
1768 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 3520, CE_ATTR_FLAGS, 0,},
1769 	/* host->target HTT */
1770 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
1771 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1772 #ifdef FEATURE_PKTLOG
1773 	/* Target -> host PKTLOG */
1774 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1775 #else
1776 	{ /* CE5 */ 5, PIPEDIR_IN,  0, 2048, CE_ATTR_FLAGS, 0,},
1777 #endif
1778 	/* Reserved for target autonomous HIF_memcpy */
1779 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1780 #ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
1781 	/* target->host WMI_DIAG */
1782 	{ /* CE7 */ 7, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
1783 #else
1784 	/* CE7 used only by Host */
1785 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
1786 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1787 #endif
1788 	/* Reserved for target */
1789 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1790 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1791 };
1792 
1793 #ifdef QCA_WIFI_QCN9224
1794 #define QCN_9224_CE_COUNT 16
1795 static struct CE_attr host_ce_config_wlan_qcn9224[] = {
1796 	/* host->target HTC control and raw streams */
1797 	{/*CE0*/ (CE_ATTR_FLAGS), 0, 16, 2048, 0, NULL,},
1798 	/* target->host HTT + HTC control */
1799 	{/*CE1*/ (CE_ATTR_FLAGS), 0, 0,  2048,
1800 		512, NULL,},
1801 	/* target->host WMI */
1802 	{/*CE2*/ (CE_ATTR_FLAGS), 0, 0,  2048,
1803 		128, NULL,},
1804 	/* host->target WMI (mac0) */
1805 	{/*CE3*/ (CE_ATTR_FLAGS), 0, 32, 2048, 0, NULL,},
1806 	/* host->target HTT */
1807 	{/*CE4*/ CE4_COMP_HTT_HTC, 0,
1808 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1809 	/* target -> host PKTLOG */
1810 #ifdef REMOVE_PKT_LOG
1811 	{ /* CE5 */ 0, 0, 0, 0, 0, NULL,},
1812 #else
1813 	{/*CE5*/ (CE_ATTR_FLAGS), 0, 0, 2048,
1814 		PKTLOG_DST_ENTRIES, NULL,},
1815 #endif
1816 	/* Target autonomous HIF_memcpy */
1817 	{/*CE6*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1818 	/* host->target WMI (mac1) */
1819 	{/*CE7*/ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
1820 	/* Reserved for target (Generic HiF memcpy */
1821 	{/*CE8*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1822 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1823 	{/*CE9*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1824 	{/*CE10*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1825 	{/*CE11*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1826 	/* Target CV prefetch */
1827 	{/*CE12*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1828 	/* Target CV prefetch */
1829 	{/*CE13*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1830 #ifdef WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE
1831 	/* target->host WMI logging, Direc-DMA */
1832 	{/*CE14*/ (CE_ATTR_FLAGS), 0, 0, 2048, 128, NULL,},
1833 #else
1834 	{/*CE14*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1835 #endif
1836 
1837 	/* Reserved for customer use */
1838 	{/*CE15*/ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, 0, 0, 0, NULL,},
1839 };
1840 
1841 static struct CE_pipe_config target_ce_config_wlan_qcn9224[] = {
1842 	/* host->target HTC control and raw streams */
1843 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1844 	/* target->host HTT */
1845 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1846 	/* target->host WMI */
1847 	{ /* CE2 */ 2, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1848 	/* host->target WMI */
1849 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1850 	/* host->target HTT */
1851 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE4_COMP_HTT_HTC, 0,},
1852 	/* Target -> host PKTLOG */
1853 	{ /* CE5 */ 5, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1854 	/* Reserved for target autonomous HIF_memcpy */
1855 	{ /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1856 	/* host->target WMI */
1857 	{ /* CE7 */ 7, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1858 	/* Reserved for target */
1859 	{ /* CE8 */ 8, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
1860 	/* CE 9, 10, 11 belong to CoreBsp & MHI driver */
1861 	/* CV prefetch */
1862 	{ /* CE12 */ 12, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1863 	/* CV prefetch */
1864 	{ /* CE13 */ 13, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1865 #ifdef WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE
1866 	/* target->host WMI logging + DirectDMA events */
1867 	{ /* CE14 */ 14, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
1868 #else
1869 	{/* CE14 unused */14, PIPEDIR_NONE, 0, 0, 0, 0,},
1870 #endif
1871 	/*CE 15 - Reserved for customer use */
1872 };
1873 #endif
1874 
1875 static struct CE_attr host_ce_config_wlan_wcn6450[] = {
1876 	/* host->target HTC control and raw streams */
1877 	{ /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
1878 	/* target->host HTT + HTC control */
1879 	{ /* CE1 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
1880 	/* target->host WMI */
1881 	{ /* CE2 */ CE_ATTR_FLAGS, 0, 0,  3520, 128, NULL,},
1882 	/* host->target WMI */
1883 	{ /* CE3 */ CE_ATTR_FLAGS, 0, 32, 3520, 0, NULL,},
1884 	/* host->target HTT command*/
1885 	{ /* CE4 */ CE_ATTR_FLAGS, 0,
1886 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1887 	/* host->target HTT data */
1888 	{ /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1889 		CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
1890 	/* target->target M3 image download + HIF MEMCPY(offload)
1891 	 * HIF memcpy(ring refill)
1892 	 */
1893 	{ /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1894 #ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
1895 	/* target->host WMI logging */
1896 	{ /* CE7 */ CE_ATTR_FLAGS, 0, 0, 2048, 32, NULL,},
1897 #else
1898 	/* ce_diag, the Diagnostic Window */
1899 	{ /* CE7 */ (CE_ATTR_DIAG_FLAGS | CE_ATTR_DISABLE_INTR), 0,
1900 		0, DIAG_TRANSFER_LIMIT, 0, NULL,},
1901 #endif
1902 	/* Unused*/
1903 	{ /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1904 	/* target->host RDDM */
1905 	{ /* CE9 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
1906 	/* target->host HTT */
1907 	{ /* CE10 */ CE_ATTR_FLAGS, 0, 0,  2048, 512, NULL,},
1908 	/* target->host HTT */
1909 	{ /* CE11 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
1910 };
1911 
1912 static struct CE_pipe_config target_ce_config_wlan_wcn6450[] = {
1913 	/* host->target HTC control and raw streams */
1914 	{ /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
1915 	/* target->host HTT */
1916 	{ /* CE1 */ 1, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1917 	/* target->host WMI  + HTC control */
1918 	{ /* CE2 */ 2, PIPEDIR_IN,  64, 3520, CE_ATTR_FLAGS, 0,},
1919 	/* host->target WMI */
1920 	{ /* CE3 */ 3, PIPEDIR_OUT, 32, 3520, CE_ATTR_FLAGS, 0,},
1921 	/* host->target HTT command*/
1922 	{ /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
1923 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1924 	/* host->target HTT data */
1925 	{ /* CE5 */ 5, PIPEDIR_OUT, 256, 256,
1926 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1927 	/* target->target HIF_memcpy*/
1928 	{ /* CE6 */ 6, PIPEDIR_INOUT, 1024, 2048, CE_ATTR_FLAGS, 0,},
1929 #ifdef WLAN_FEATURE_WMI_DIAG_OVER_CE7
1930 	/* target->host WMI logging */
1931 	{ /* CE7 */ 7, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
1932 #else
1933 	/* CE7 used only by Host */
1934 	{ /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
1935 		(CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
1936 #endif
1937 	/* CE8 unused */
1938 	{ /* CE8 */ 8, PIPEDIR_IN, 0, 0, CE_ATTR_FLAGS, 0,},
1939 	/* CE9 target->host RDDM*/
1940 	{ /* CE9 */ 9, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1941 	/* CE10 target->host HTT */
1942 	{ /* CE10 */ 10, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1943 	/* Target->host HTT */
1944 	{ /* CE11 */ 11, PIPEDIR_IN,  32, 2048, CE_ATTR_FLAGS, 0,},
1945 };
1946 #endif /* __HIF_PCI_INTERNAL_H__ */
1947