ce_assignment.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. /*
  2. * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /*
  27. * Implementation of the Host-side Host InterFace (HIF) API
  28. * for a Host/Target interconnect using Copy Engines over PCIe.
  29. */
  30. #ifndef __HIF_PCI_INTERNAL_H__
  31. #define __HIF_PCI_INTERNAL_H__
  32. #ifndef CONFIG_WIN
  33. #ifndef PEER_CACHEING_HOST_ENABLE
  34. #define PEER_CACHEING_HOST_ENABLE 0
  35. #endif
  36. #endif
  37. #define HIF_PCI_DEBUG ATH_DEBUG_MAKE_MODULE_MASK(0)
  38. #define HIF_PCI_IPA_UC_ASSIGNED_CE 5
  39. #if defined(DEBUG)
  40. static ATH_DEBUG_MASK_DESCRIPTION g_hif_debug_description[] = {
  41. {HIF_PCI_DEBUG, "hif_pci"},
  42. };
  43. ATH_DEBUG_INSTANTIATE_MODULE_VAR(hif, "hif", "PCIe Host Interface",
  44. ATH_DEBUG_MASK_DEFAULTS | ATH_DEBUG_INFO,
  45. ATH_DEBUG_DESCRIPTION_COUNT
  46. (g_hif_debug_description),
  47. g_hif_debug_description);
  48. #endif
  49. #ifdef CONFIG_ATH_PCIE_ACCESS_DEBUG
  50. /* globals are initialized to 0 by the compiler */;
  51. spinlock_t pcie_access_log_lock;
  52. unsigned int pcie_access_log_seqnum;
  53. HIF_ACCESS_LOG pcie_access_log[PCIE_ACCESS_LOG_NUM];
  54. static void hif_target_dump_access_log(void);
  55. #endif
  56. /*
  57. * Host software's Copy Engine configuration.
  58. * This table is derived from the CE_PCI TABLE, above.
  59. */
  60. #ifdef BIG_ENDIAN_HOST
  61. #define CE_ATTR_FLAGS CE_ATTR_BYTE_SWAP_DATA
  62. #else
  63. #define CE_ATTR_FLAGS 0
  64. #endif
  65. /* Maximum number of Copy Engine's supported */
  66. #define CE_HTT_H2T_MSG_SRC_NENTRIES 2048
  67. #define CE_HTT_H2T_MSG_SRC_NENTRIES_AR900B 4096
  68. #define DIAG_CE_ID 7
  69. #define EPPING_CE_FLAGS_POLL \
  70. (CE_ATTR_DISABLE_INTR|CE_ATTR_ENABLE_POLL|CE_ATTR_FLAGS)
  71. #ifdef CONFIG_WIN
  72. #define PIPEDIR_INOUT_H2H 4
  73. #endif
  74. #ifdef QCA_WIFI_3_0
  75. static struct CE_attr host_ce_config_wlan[] = {
  76. /* host->target HTC control and raw streams */
  77. { /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
  78. /* target->host HTT + HTC control */
  79. { /* CE1 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
  80. /* target->host WMI */
  81. { /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 64, NULL,},
  82. /* host->target WMI */
  83. { /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
  84. /* host->target HTT */
  85. { /* CE4 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
  86. CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
  87. /* ipa_uc->target HTC control */
  88. { /* CE5 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
  89. 1024, 512, 0, NULL,},
  90. /* Target autonomous HIF_memcpy */
  91. { /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  92. /* ce_diag, the Diagnostic Window */
  93. { /* CE7 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,
  94. 2, DIAG_TRANSFER_LIMIT, 2, NULL,},
  95. /* Target to uMC */
  96. { /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  97. /* target->host HTT */
  98. { /* CE9 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
  99. /* target->host HTT */
  100. { /* CE10 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
  101. /* target -> host PKTLOG */
  102. { /* CE11 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
  103. };
  104. static struct CE_pipe_config target_ce_config_wlan[] = {
  105. /* host->target HTC control and raw streams */
  106. { /* CE0 */ 0, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
  107. /* target->host HTT */
  108. { /* CE1 */ 1, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
  109. /* target->host WMI + HTC control */
  110. { /* CE2 */ 2, PIPEDIR_IN, 64, 2048, CE_ATTR_FLAGS, 0,},
  111. /* host->target WMI */
  112. { /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
  113. /* host->target HTT */
  114. { /* CE4 */ 4, PIPEDIR_OUT, 256, 256,
  115. (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
  116. /* NB: 50% of src nentries, since tx has 2 frags */
  117. /* ipa_uc->target */
  118. { /* CE5 */ 5, PIPEDIR_OUT, 1024, 64,
  119. (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
  120. /* Reserved for target autonomous HIF_memcpy */
  121. { /* CE6 */ 6, PIPEDIR_INOUT, 32, 16384, CE_ATTR_FLAGS, 0,},
  122. /* CE7 used only by Host */
  123. { /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0,
  124. (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0,},
  125. /* CE8 used only by IPA */
  126. { /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
  127. /* CE9 target->host HTT */
  128. { /* CE9 */ 9, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
  129. /* CE10 target->host HTT */
  130. { /* CE10 */ 10, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
  131. /* Target -> host PKTLOG */
  132. { /* CE11 */ 11, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
  133. };
  134. static struct CE_attr host_ce_config_wlan_epping_poll[] = {
  135. /* host->target HTC control and raw streams */
  136. { /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
  137. /* target->host EP-ping */
  138. { /* CE1 */ EPPING_CE_FLAGS_POLL, 0, 0, 2048, 128, NULL,},
  139. /* target->host EP-ping */
  140. { /* CE2 */ EPPING_CE_FLAGS_POLL, 0, 0, 2048, 128, NULL,},
  141. /* host->target EP-ping */
  142. { /* CE3 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
  143. /* host->target EP-ping */
  144. { /* CE4 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
  145. /* EP-ping heartbeat */
  146. { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL,},
  147. /* unused */
  148. { /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  149. /* ce_diag, the Diagnostic Window */
  150. { /* CE7 */ CE_ATTR_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL,},
  151. };
  152. static struct CE_attr host_ce_config_wlan_epping_irq[] = {
  153. /* host->target HTC control and raw streams */
  154. { /* CE0 */ CE_ATTR_FLAGS, 0, 16, 2048, 0, NULL,},
  155. /* target->host EP-ping */
  156. { /* CE1 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL,},
  157. /* target->host EP-ping */
  158. { /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL,},
  159. /* host->target EP-ping */
  160. { /* CE3 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
  161. /* host->target EP-ping */
  162. { /* CE4 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
  163. /* EP-ping heartbeat */
  164. { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL,},
  165. /* unused */
  166. { /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  167. /* ce_diag, the Diagnostic Window */
  168. { /* CE7 */ CE_ATTR_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL,},
  169. };
  170. /*
  171. * EP-ping firmware's CE configuration
  172. */
  173. static struct CE_pipe_config target_ce_config_wlan_epping[] = {
  174. /* host->target HTC control and raw streams */
  175. { /* CE0 */ 0, PIPEDIR_OUT, 16, 2048, CE_ATTR_FLAGS, 0,},
  176. /* target->host EP-ping */
  177. { /* CE1 */ 1, PIPEDIR_IN, 128, 2048, CE_ATTR_FLAGS, 0,},
  178. /* target->host EP-ping */
  179. { /* CE2 */ 2, PIPEDIR_IN, 128, 2048, CE_ATTR_FLAGS, 0,},
  180. /* host->target EP-ping */
  181. { /* CE3 */ 3, PIPEDIR_OUT, 128, 2048, CE_ATTR_FLAGS, 0,},
  182. /* host->target EP-ping */
  183. { /* CE4 */ 4, PIPEDIR_OUT, 128, 2048, CE_ATTR_FLAGS, 0,},
  184. /* EP-ping heartbeat */
  185. { /* CE5 */ 5, PIPEDIR_IN, 128, 2048, CE_ATTR_FLAGS, 0,},
  186. /* unused */
  187. { /* CE6 */ 6, PIPEDIR_INOUT, 0, 0, CE_ATTR_FLAGS, 0,},
  188. /* CE7 used only by Host */
  189. { /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0, 0, 0,},
  190. /* CE8 used only by IPA */
  191. { /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}
  192. };
  193. #else
  194. static struct CE_attr host_ce_config_wlan[] = {
  195. /* host->target HTC control and raw streams */
  196. { /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL,},
  197. /* target->host HTT + HTC control */
  198. { /* CE1 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,},
  199. /* target->host WMI */
  200. { /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 32, NULL,},
  201. /* host->target WMI */
  202. { /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,},
  203. /* host->target HTT */
  204. { /* CE4 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0,
  205. CE_HTT_H2T_MSG_SRC_NENTRIES, 256, 0, NULL,},
  206. /* ipa_uc->target HTC control */
  207. { /* CE5 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0,
  208. 1024, 512, 0, NULL,},
  209. /* Target autonomous HIF_memcpy */
  210. { /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  211. /* ce_diag, the Diagnostic Window */
  212. { /* CE7 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR,
  213. 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL,},
  214. };
  215. static struct CE_pipe_config target_ce_config_wlan[] = {
  216. /* host->target HTC control and raw streams */
  217. { /* CE0 */ 0, PIPEDIR_OUT, 32, 256, CE_ATTR_FLAGS, 0,},
  218. /* target->host HTT + HTC control */
  219. { /* CE1 */ 1, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
  220. /* target->host WMI */
  221. { /* CE2 */ 2, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
  222. /* host->target WMI */
  223. { /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0,},
  224. /* host->target HTT */
  225. { /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE_ATTR_FLAGS, 0,},
  226. /* NB: 50% of src nentries, since tx has 2 frags */
  227. /* ipa_uc->target HTC control */
  228. { /* CE5 */ 5, PIPEDIR_OUT, 1024, 64, CE_ATTR_FLAGS, 0,},
  229. /* Reserved for target autonomous HIF_memcpy */
  230. { /* CE6 */ 6, PIPEDIR_INOUT, 32, 4096, CE_ATTR_FLAGS, 0,},
  231. /* CE7 used only by Host */
  232. { /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0, 0, 0,},
  233. /* CE8 used only by IPA */
  234. { /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,}
  235. };
  236. static struct CE_attr host_ce_config_wlan_epping_poll[] = {
  237. /* host->target HTC control and raw streams */
  238. { /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL,},
  239. /* target->host EP-ping */
  240. { /* CE1 */ EPPING_CE_FLAGS_POLL, 0, 0, 2048, 128, NULL,},
  241. /* target->host EP-ping */
  242. { /* CE2 */ EPPING_CE_FLAGS_POLL, 0, 0, 2048, 128, NULL,},
  243. /* host->target EP-ping */
  244. { /* CE3 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
  245. /* host->target EP-ping */
  246. { /* CE4 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
  247. /* EP-ping heartbeat */
  248. { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL,},
  249. /* unused */
  250. { /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  251. /* ce_diag, the Diagnostic Window */
  252. { /* CE7 */ CE_ATTR_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL,},
  253. { /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  254. /* The following CEs are not being used yet */
  255. { /* CE9 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  256. { /* CE10 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  257. { /* CE11 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  258. };
  259. static struct CE_attr host_ce_config_wlan_epping_irq[] = {
  260. /* host->target HTC control and raw streams */
  261. { /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL,},
  262. /* target->host EP-ping */
  263. { /* CE1 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL,},
  264. /* target->host EP-ping */
  265. { /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL,},
  266. /* host->target EP-ping */
  267. { /* CE3 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
  268. /* host->target EP-ping */
  269. { /* CE4 */ CE_ATTR_FLAGS, 0, 128, 2048, 0, NULL,},
  270. /* EP-ping heartbeat */
  271. { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL,},
  272. /* unused */
  273. { /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  274. /* ce_diag, the Diagnostic Window */
  275. { /* CE7 */ CE_ATTR_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL,},
  276. { /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  277. /* The following CEs are not being used yet */
  278. { /* CE9 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  279. { /* CE10 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  280. { /* CE11 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL,},
  281. };
  282. /*
  283. * EP-ping firmware's CE configuration
  284. */
  285. static struct CE_pipe_config target_ce_config_wlan_epping[] = {
  286. /* host->target HTC control and raw streams */
  287. { /* CE0 */ 0, PIPEDIR_OUT, 16, 256, CE_ATTR_FLAGS, 0,},
  288. /* target->host EP-ping */
  289. { /* CE1 */ 1, PIPEDIR_IN, 128, 2048, CE_ATTR_FLAGS, 0,},
  290. /* target->host EP-ping */
  291. { /* CE2 */ 2, PIPEDIR_IN, 128, 2048, CE_ATTR_FLAGS, 0,},
  292. /* host->target EP-ping */
  293. { /* CE3 */ 3, PIPEDIR_OUT, 128, 2048, CE_ATTR_FLAGS, 0,},
  294. /* host->target EP-ping */
  295. { /* CE4 */ 4, PIPEDIR_OUT, 128, 2048, CE_ATTR_FLAGS, 0,},
  296. /* EP-ping heartbeat */
  297. { /* CE5 */ 5, PIPEDIR_IN, 128, 2048, CE_ATTR_FLAGS, 0,},
  298. /* unused */
  299. { /* CE6 */ 6, PIPEDIR_INOUT, 0, 0, CE_ATTR_FLAGS, 0,},
  300. /* CE7 used only by Host */
  301. { /* CE7 */ 7, PIPEDIR_INOUT_H2H, 0, 0, 0, 0,},
  302. /* CE8 used only by IPA */
  303. { /* CE8 */ 8, PIPEDIR_IN, 32, 2048, CE_ATTR_FLAGS, 0,},
  304. { /* CE9 */ 9, PIPEDIR_IN, 0, 0, CE_ATTR_FLAGS, 0,},
  305. { /* CE10 */ 10, PIPEDIR_IN, 0, 0, CE_ATTR_FLAGS, 0,},
  306. { /* CE11 */ 11, PIPEDIR_IN, 0, 0, CE_ATTR_FLAGS, 0,},
  307. };
  308. #endif
  309. static struct CE_attr host_ce_config_wlan_ar9888[] = {
  310. { /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL, }, /* host->target HTC control and raw streams */
  311. /* could be moved to share CE3 */
  312. { /* CE1 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },/* target->host BMI + HTC control */
  313. { /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL, },/* target->host WMI */
  314. { /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL, },/* host->target WMI */
  315. { /* CE4 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0,
  316. CE_HTT_H2T_MSG_SRC_NENTRIES_AR900B, 256, 0, NULL, }, /* host->target HTT */
  317. #if WLAN_FEATURE_FASTPATH
  318. { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, }, /* target->host HTT messages */
  319. #else /* WLAN_FEATURE_FASTPATH */
  320. { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, }, /* unused */
  321. #endif /* WLAN_FEATURE_FASTPATH */
  322. { /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, }, /* Target autonomous HIF_memcpy */
  323. { /* CE7 */ CE_ATTR_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL, }, /* ce_diag, the Diagnostic Window */
  324. { /* CE8 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, }, /* Target autonomous HIF_memcpy */
  325. };
  326. static struct CE_attr host_ce_config_wlan_ar900b[] = {
  327. { /* CE0 */ CE_ATTR_FLAGS, 0, 16, 256, 0, NULL, }, /* host->target HTC control and raw streams */
  328. /* could be moved to share CE3 */
  329. { /* CE1 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, },/* target->host BMI + HTC control */
  330. { /* CE2 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL, },/* target->host WMI */
  331. { /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL, },/* host->target WMI */
  332. { /* CE4 */ CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR, 0,
  333. CE_HTT_H2T_MSG_SRC_NENTRIES_AR900B, 256, 0, NULL, }, /* host->target HTT */
  334. #if WLAN_FEATURE_FASTPATH
  335. { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 512, 512, NULL, }, /* target->host HTT messages */
  336. #else /* WLAN_FEATURE_FASTPATH */
  337. { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, }, /* unused */
  338. #endif /* WLAN_FEATURE_FASTPATH */
  339. { /* CE6 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, }, /* Target autonomous HIF_memcpy */
  340. { /* CE7 */ CE_ATTR_FLAGS, 0, 2, DIAG_TRANSFER_LIMIT, 2, NULL, }, /* ce_diag, the Diagnostic Window */
  341. { /* CE8 */ CE_ATTR_FLAGS, 0, 0, 2048, 128, NULL, },/* target->host pktlog */
  342. { /* CE9 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, }, /* Target autonomous HIF_memcpy */
  343. { /* CE10 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, }, /* Target autonomous HIF_memcpy */
  344. { /* CE11 */ CE_ATTR_FLAGS, 0, 0, 0, 0, NULL, }, /* Target autonomous HIF_memcpy */
  345. };
  346. static struct CE_pipe_config target_ce_config_wlan_ar9888[] = {
  347. { /* CE0 */ 0, PIPEDIR_OUT, 32, 256, CE_ATTR_FLAGS, 0, }, /* host->target HTC control and raw streams */
  348. { /* CE1 */ 1, PIPEDIR_IN, 32, 512, CE_ATTR_FLAGS, 0, }, /* target->host HTC control */
  349. { /* CE2 */ 2, PIPEDIR_IN, 64, 2048, CE_ATTR_FLAGS, 0, }, /* target->host WMI */
  350. { /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0, }, /* host->target WMI */
  351. { /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE_ATTR_FLAGS, 0, }, /* host->target HTT */
  352. /* NB: 50% of src nentries, since tx has 2 frags */
  353. #if WLAN_FEATURE_FASTPATH
  354. { /* CE5 */ 5, PIPEDIR_IN, 32, 512, CE_ATTR_FLAGS, 0, }, /* target->host HTT */
  355. #else
  356. { /* CE5 */ 5, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0, }, /* unused */
  357. #endif
  358. { /* CE6 */ 6, PIPEDIR_INOUT, 32, 4096, CE_ATTR_FLAGS, 0, },/* Reserved for target autonomous HIF_memcpy */
  359. /* CE7 used only by Host */
  360. };
  361. static struct CE_pipe_config target_ce_config_wlan_ar900b[] = {
  362. { /* CE0 */ 0, PIPEDIR_OUT, 32, 256, CE_ATTR_FLAGS, 0, }, /* host->target HTC control and raw streams */
  363. { /* CE1 */ 1, PIPEDIR_IN, 32, 512, CE_ATTR_FLAGS, 0, }, /* target->host HTC control */
  364. { /* CE2 */ 2, PIPEDIR_IN, 64, 2048, CE_ATTR_FLAGS, 0, }, /* target->host WMI */
  365. { /* CE3 */ 3, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0, }, /* host->target WMI */
  366. { /* CE4 */ 4, PIPEDIR_OUT, 256, 256, CE_ATTR_FLAGS, 0, }, /* host->target HTT */
  367. /* NB: 50% of src nentries, since tx has 2 frags */
  368. #if WLAN_FEATURE_FASTPATH
  369. { /* CE5 */ 5, PIPEDIR_IN, 32, 512, CE_ATTR_FLAGS, 0, }, /* target->host HTT */
  370. #else
  371. { /* CE5 */ 5, PIPEDIR_OUT, 32, 2048, CE_ATTR_FLAGS, 0, }, /* unused */
  372. #endif
  373. { /* CE6 */ 6, PIPEDIR_INOUT, 32, 4096, CE_ATTR_FLAGS, 0, },/* Reserved for target autonomous HIF_memcpy */
  374. { /* CE7 */ 7, PIPEDIR_INOUT, 0, 0, 0, 0, }, /* CE7 used only by Host */
  375. { /* CE8 */ 8, PIPEDIR_IN, 64, 2048, CE_ATTR_FLAGS
  376. | CE_ATTR_DISABLE_INTR, 0, }, /* target->host packtlog */
  377. #if PEER_CACHEING_HOST_ENABLE
  378. { /* CE9 */ 9, PIPEDIR_INOUT, 32, 2048, CE_ATTR_FLAGS |
  379. CE_ATTR_DISABLE_INTR, 0, }, /* target autonomous qcache memcpy */
  380. #endif
  381. };
  382. static struct CE_attr *host_ce_config = host_ce_config_wlan;
  383. static struct CE_pipe_config *target_ce_config = target_ce_config_wlan;
  384. static int target_ce_config_sz = sizeof(target_ce_config_wlan);
  385. #endif /* __HIF_PCI_INTERNAL_H__ */