tcl_status_ring.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. /*
  2. * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. // $ATH_LICENSE_HW_HDR_C$
  19. //
  20. // DO NOT EDIT! This file is automatically generated
  21. // These definitions are tied to a particular hardware layout
  22. #ifndef _TCL_STATUS_RING_H_
  23. #define _TCL_STATUS_RING_H_
  24. #if !defined(__ASSEMBLER__)
  25. #endif
  26. // ################ START SUMMARY #################
  27. //
  28. // Dword Fields
  29. // 0 gse_ctrl[3:0], ase_fse_sel[4], cache_op_res[6:5], reserved_0a[7], msdu_cnt_n[31:8]
  30. // 1 msdu_byte_cnt_n[31:0]
  31. // 2 msdu_timestmp_n[31:0]
  32. // 3 cmd_meta_data_31_0[31:0]
  33. // 4 cmd_meta_data_63_32[31:0]
  34. // 5 hash_indx_val[19:0], reserved_5a[31:20]
  35. // 6 reserved_6a[31:0]
  36. // 7 reserved_7a[19:0], ring_id[27:20], looping_count[31:28]
  37. //
  38. // ################ END SUMMARY #################
  39. #define NUM_OF_DWORDS_TCL_STATUS_RING 8
  40. struct tcl_status_ring {
  41. uint32_t gse_ctrl : 4, //[3:0]
  42. ase_fse_sel : 1, //[4]
  43. cache_op_res : 2, //[6:5]
  44. reserved_0a : 1, //[7]
  45. msdu_cnt_n : 24; //[31:8]
  46. uint32_t msdu_byte_cnt_n : 32; //[31:0]
  47. uint32_t msdu_timestmp_n : 32; //[31:0]
  48. uint32_t cmd_meta_data_31_0 : 32; //[31:0]
  49. uint32_t cmd_meta_data_63_32 : 32; //[31:0]
  50. uint32_t hash_indx_val : 20, //[19:0]
  51. reserved_5a : 12; //[31:20]
  52. uint32_t reserved_6a : 32; //[31:0]
  53. uint32_t reserved_7a : 20, //[19:0]
  54. ring_id : 8, //[27:20]
  55. looping_count : 4; //[31:28]
  56. };
  57. /*
  58. gse_ctrl
  59. GSE control operations. This includes cache operations
  60. and table entry statistics read/clear operation.
  61. <enum 0 rd_stat> Report or Read statistics
  62. <enum 1 srch_dis> Search disable. Report only Hash
  63. <enum 2 Wr_bk_single> Write Back single entry
  64. <enum 3 wr_bk_all> Write Back entire cache entry
  65. <enum 4 inval_single> Invalidate single cache entry
  66. <enum 5 inval_all> Invalidate entire cache
  67. <enum 6 wr_bk_inval_single> Write back and Invalidate
  68. single entry in cache
  69. <enum 7 wr_bk_inval_all> write back and invalidate
  70. entire cache
  71. <enum 8 clr_stat_single> Clear statistics for single
  72. entry
  73. <legal 0-8>
  74. Rest of the values reserved.
  75. For all single entry control operations (write back,
  76. Invalidate or both)Statistics will be reported
  77. ase_fse_sel
  78. Search Engine for which operation is done.
  79. 1'b0: Address Search Engine Result
  80. 1'b1: Flow Search Engine result
  81. cache_op_res
  82. Cache operation result. Following are results of cache
  83. operation.
  84. <enum 0 op_done> Operation successful
  85. <enum 1 not_fnd> Entry not found in Table
  86. <enum 2 timeout_er> Timeout Error
  87. <legal 0-2>
  88. reserved_0a
  89. <legal 0>
  90. msdu_cnt_n
  91. MSDU count of Entry. Valid when GSE_CTRL is 4'b0111 and
  92. 4'b1000
  93. msdu_byte_cnt_n
  94. MSDU byte count for entry 1. Valid when GSE_CTRL is
  95. 4'b0111 and 4'b1000
  96. msdu_timestmp_n
  97. MSDU timestamp for entry 1. Valid when GSE_CTRL is
  98. 4'b0111 and 4'b1000
  99. cmd_meta_data_31_0
  100. Meta data from input ring
  101. <legal all>
  102. cmd_meta_data_63_32
  103. Meta data from input ring
  104. <legal all>
  105. hash_indx_val
  106. Hash value of the entry in table in case of search
  107. failed or search disable.
  108. <legal all>
  109. reserved_5a
  110. <legal 0>
  111. reserved_6a
  112. <legal 0>
  113. reserved_7a
  114. <legal 0>
  115. ring_id
  116. The buffer pointer ring ID.
  117. Helps with debugging when dumping ring contents.
  118. <legal all>
  119. looping_count
  120. A count value that indicates the number of times the
  121. producer of entries into the Ring has looped around the
  122. ring.
  123. At initialization time, this value is set to 0. On the
  124. first loop, this value is set to 1. After the max value is
  125. reached allowed by the number of bits for this field, the
  126. count value continues with 0 again.
  127. In case SW is the consumer of the ring entries, it can
  128. use this field to figure out up to where the producer of
  129. entries has created new entries. This eliminates the need to
  130. check where the head pointer' of the ring is located once
  131. the SW starts processing an interrupt indicating that new
  132. entries have been put into this ring...
  133. Also note that SW if it wants only needs to look at the
  134. LSB bit of this count value.
  135. <legal all>
  136. */
  137. /* Description TCL_STATUS_RING_0_GSE_CTRL
  138. GSE control operations. This includes cache operations
  139. and table entry statistics read/clear operation.
  140. <enum 0 rd_stat> Report or Read statistics
  141. <enum 1 srch_dis> Search disable. Report only Hash
  142. <enum 2 Wr_bk_single> Write Back single entry
  143. <enum 3 wr_bk_all> Write Back entire cache entry
  144. <enum 4 inval_single> Invalidate single cache entry
  145. <enum 5 inval_all> Invalidate entire cache
  146. <enum 6 wr_bk_inval_single> Write back and Invalidate
  147. single entry in cache
  148. <enum 7 wr_bk_inval_all> write back and invalidate
  149. entire cache
  150. <enum 8 clr_stat_single> Clear statistics for single
  151. entry
  152. <legal 0-8>
  153. Rest of the values reserved.
  154. For all single entry control operations (write back,
  155. Invalidate or both)Statistics will be reported
  156. */
  157. #define TCL_STATUS_RING_0_GSE_CTRL_OFFSET 0x00000000
  158. #define TCL_STATUS_RING_0_GSE_CTRL_LSB 0
  159. #define TCL_STATUS_RING_0_GSE_CTRL_MASK 0x0000000f
  160. /* Description TCL_STATUS_RING_0_ASE_FSE_SEL
  161. Search Engine for which operation is done.
  162. 1'b0: Address Search Engine Result
  163. 1'b1: Flow Search Engine result
  164. */
  165. #define TCL_STATUS_RING_0_ASE_FSE_SEL_OFFSET 0x00000000
  166. #define TCL_STATUS_RING_0_ASE_FSE_SEL_LSB 4
  167. #define TCL_STATUS_RING_0_ASE_FSE_SEL_MASK 0x00000010
  168. /* Description TCL_STATUS_RING_0_CACHE_OP_RES
  169. Cache operation result. Following are results of cache
  170. operation.
  171. <enum 0 op_done> Operation successful
  172. <enum 1 not_fnd> Entry not found in Table
  173. <enum 2 timeout_er> Timeout Error
  174. <legal 0-2>
  175. */
  176. #define TCL_STATUS_RING_0_CACHE_OP_RES_OFFSET 0x00000000
  177. #define TCL_STATUS_RING_0_CACHE_OP_RES_LSB 5
  178. #define TCL_STATUS_RING_0_CACHE_OP_RES_MASK 0x00000060
  179. /* Description TCL_STATUS_RING_0_RESERVED_0A
  180. <legal 0>
  181. */
  182. #define TCL_STATUS_RING_0_RESERVED_0A_OFFSET 0x00000000
  183. #define TCL_STATUS_RING_0_RESERVED_0A_LSB 7
  184. #define TCL_STATUS_RING_0_RESERVED_0A_MASK 0x00000080
  185. /* Description TCL_STATUS_RING_0_MSDU_CNT_N
  186. MSDU count of Entry. Valid when GSE_CTRL is 4'b0111 and
  187. 4'b1000
  188. */
  189. #define TCL_STATUS_RING_0_MSDU_CNT_N_OFFSET 0x00000000
  190. #define TCL_STATUS_RING_0_MSDU_CNT_N_LSB 8
  191. #define TCL_STATUS_RING_0_MSDU_CNT_N_MASK 0xffffff00
  192. /* Description TCL_STATUS_RING_1_MSDU_BYTE_CNT_N
  193. MSDU byte count for entry 1. Valid when GSE_CTRL is
  194. 4'b0111 and 4'b1000
  195. */
  196. #define TCL_STATUS_RING_1_MSDU_BYTE_CNT_N_OFFSET 0x00000004
  197. #define TCL_STATUS_RING_1_MSDU_BYTE_CNT_N_LSB 0
  198. #define TCL_STATUS_RING_1_MSDU_BYTE_CNT_N_MASK 0xffffffff
  199. /* Description TCL_STATUS_RING_2_MSDU_TIMESTMP_N
  200. MSDU timestamp for entry 1. Valid when GSE_CTRL is
  201. 4'b0111 and 4'b1000
  202. */
  203. #define TCL_STATUS_RING_2_MSDU_TIMESTMP_N_OFFSET 0x00000008
  204. #define TCL_STATUS_RING_2_MSDU_TIMESTMP_N_LSB 0
  205. #define TCL_STATUS_RING_2_MSDU_TIMESTMP_N_MASK 0xffffffff
  206. /* Description TCL_STATUS_RING_3_CMD_META_DATA_31_0
  207. Meta data from input ring
  208. <legal all>
  209. */
  210. #define TCL_STATUS_RING_3_CMD_META_DATA_31_0_OFFSET 0x0000000c
  211. #define TCL_STATUS_RING_3_CMD_META_DATA_31_0_LSB 0
  212. #define TCL_STATUS_RING_3_CMD_META_DATA_31_0_MASK 0xffffffff
  213. /* Description TCL_STATUS_RING_4_CMD_META_DATA_63_32
  214. Meta data from input ring
  215. <legal all>
  216. */
  217. #define TCL_STATUS_RING_4_CMD_META_DATA_63_32_OFFSET 0x00000010
  218. #define TCL_STATUS_RING_4_CMD_META_DATA_63_32_LSB 0
  219. #define TCL_STATUS_RING_4_CMD_META_DATA_63_32_MASK 0xffffffff
  220. /* Description TCL_STATUS_RING_5_HASH_INDX_VAL
  221. Hash value of the entry in table in case of search
  222. failed or search disable.
  223. <legal all>
  224. */
  225. #define TCL_STATUS_RING_5_HASH_INDX_VAL_OFFSET 0x00000014
  226. #define TCL_STATUS_RING_5_HASH_INDX_VAL_LSB 0
  227. #define TCL_STATUS_RING_5_HASH_INDX_VAL_MASK 0x000fffff
  228. /* Description TCL_STATUS_RING_5_RESERVED_5A
  229. <legal 0>
  230. */
  231. #define TCL_STATUS_RING_5_RESERVED_5A_OFFSET 0x00000014
  232. #define TCL_STATUS_RING_5_RESERVED_5A_LSB 20
  233. #define TCL_STATUS_RING_5_RESERVED_5A_MASK 0xfff00000
  234. /* Description TCL_STATUS_RING_6_RESERVED_6A
  235. <legal 0>
  236. */
  237. #define TCL_STATUS_RING_6_RESERVED_6A_OFFSET 0x00000018
  238. #define TCL_STATUS_RING_6_RESERVED_6A_LSB 0
  239. #define TCL_STATUS_RING_6_RESERVED_6A_MASK 0xffffffff
  240. /* Description TCL_STATUS_RING_7_RESERVED_7A
  241. <legal 0>
  242. */
  243. #define TCL_STATUS_RING_7_RESERVED_7A_OFFSET 0x0000001c
  244. #define TCL_STATUS_RING_7_RESERVED_7A_LSB 0
  245. #define TCL_STATUS_RING_7_RESERVED_7A_MASK 0x000fffff
  246. /* Description TCL_STATUS_RING_7_RING_ID
  247. The buffer pointer ring ID.
  248. Helps with debugging when dumping ring contents.
  249. <legal all>
  250. */
  251. #define TCL_STATUS_RING_7_RING_ID_OFFSET 0x0000001c
  252. #define TCL_STATUS_RING_7_RING_ID_LSB 20
  253. #define TCL_STATUS_RING_7_RING_ID_MASK 0x0ff00000
  254. /* Description TCL_STATUS_RING_7_LOOPING_COUNT
  255. A count value that indicates the number of times the
  256. producer of entries into the Ring has looped around the
  257. ring.
  258. At initialization time, this value is set to 0. On the
  259. first loop, this value is set to 1. After the max value is
  260. reached allowed by the number of bits for this field, the
  261. count value continues with 0 again.
  262. In case SW is the consumer of the ring entries, it can
  263. use this field to figure out up to where the producer of
  264. entries has created new entries. This eliminates the need to
  265. check where the head pointer' of the ring is located once
  266. the SW starts processing an interrupt indicating that new
  267. entries have been put into this ring...
  268. Also note that SW if it wants only needs to look at the
  269. LSB bit of this count value.
  270. <legal all>
  271. */
  272. #define TCL_STATUS_RING_7_LOOPING_COUNT_OFFSET 0x0000001c
  273. #define TCL_STATUS_RING_7_LOOPING_COUNT_LSB 28
  274. #define TCL_STATUS_RING_7_LOOPING_COUNT_MASK 0xf0000000
  275. #endif // _TCL_STATUS_RING_H_