tcl_gse_cmd.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. /*
  2. * Copyright (c) 2016 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_GSE_CMD_H_
  23. #define _TCL_GSE_CMD_H_
  24. #if !defined(__ASSEMBLER__)
  25. #endif
  26. // ################ START SUMMARY #################
  27. //
  28. // Dword Fields
  29. // 0 control_buffer_addr_31_0[31:0]
  30. // 1 control_buffer_addr_39_32[7:0], gse_ctrl[11:8], gse_sel[12], status_destination_ring_id[13], swap[14], reserved_1a[31:15]
  31. // 2 cmd_meta_data_31_0[31:0]
  32. // 3 cmd_meta_data_63_32[31:0]
  33. // 4 reserved_4a[31:0]
  34. // 5 reserved_5a[31:0]
  35. // 6 reserved_6a[19:0], ring_id[27:20], looping_count[31:28]
  36. //
  37. // ################ END SUMMARY #################
  38. #define NUM_OF_DWORDS_TCL_GSE_CMD 7
  39. struct tcl_gse_cmd {
  40. uint32_t control_buffer_addr_31_0 : 32; //[31:0]
  41. uint32_t control_buffer_addr_39_32 : 8, //[7:0]
  42. gse_ctrl : 4, //[11:8]
  43. gse_sel : 1, //[12]
  44. status_destination_ring_id : 1, //[13]
  45. swap : 1, //[14]
  46. reserved_1a : 17; //[31:15]
  47. uint32_t cmd_meta_data_31_0 : 32; //[31:0]
  48. uint32_t cmd_meta_data_63_32 : 32; //[31:0]
  49. uint32_t reserved_4a : 32; //[31:0]
  50. uint32_t reserved_5a : 32; //[31:0]
  51. uint32_t reserved_6a : 20, //[19:0]
  52. ring_id : 8, //[27:20]
  53. looping_count : 4; //[31:28]
  54. };
  55. /*
  56. control_buffer_addr_31_0
  57. Address (lower 32 bits) of a control buffer containing
  58. additional info needed for this command execution.
  59. <legal all>
  60. control_buffer_addr_39_32
  61. Address (upper 8 bits) of a control buffer containing
  62. additional info needed for this command execution.
  63. <legal all>
  64. gse_ctrl
  65. GSE control operations. This includes cache operations
  66. and table entry statistics read/clear operation.
  67. <enum 0 rd_stat> Report or Read statistics
  68. <enum 1 srch_dis> Search disable. Report only Hash
  69. <enum 2 Wr_bk_single> Write Back single entry
  70. <enum 3 wr_bk_all> Write Back entire cache entry
  71. <enum 4 inval_single> Invalidate single cache entry
  72. <enum 5 inval_all> Invalidate entire cache
  73. <enum 6 wr_bk_inval_single> Write back and Invalidate
  74. single entry in cache
  75. <enum 7 wr_bk_inval_all> write back and invalidate
  76. entire cache
  77. <enum 8 clr_stat_single> Clear statistics for single
  78. entry
  79. <legal 0-8>
  80. Rest of the values reserved.
  81. For all single entry control operations (write back,
  82. Invalidate or both)Statistics will be reported
  83. gse_sel
  84. Bit to select the ASE or FSE to do the operation mention
  85. by GSE_ctrl bit
  86. 0: FSE select
  87. 1: ASE select
  88. status_destination_ring_id
  89. The TCL status ring to which the GSE status needs to be
  90. send.
  91. <enum 0 tcl_status_0_ring>
  92. <enum 1 tcl_status_1_ring>
  93. <legal all>
  94. swap
  95. Bit to enable byte swapping of contents of buffer
  96. <enum 0 Byte_swap_disable >
  97. <enum 1 byte_swap_enable >
  98. <legal all>
  99. reserved_1a
  100. <legal 0>
  101. cmd_meta_data_31_0
  102. Meta data to be returned in the status descriptor
  103. <legal all>
  104. cmd_meta_data_63_32
  105. Meta data to be returned in the status descriptor
  106. <legal all>
  107. reserved_4a
  108. <legal 0>
  109. reserved_5a
  110. <legal 0>
  111. reserved_6a
  112. <legal 0>
  113. ring_id
  114. Helps with debugging when dumping ring contents.
  115. <legal all>
  116. looping_count
  117. A count value that indicates the number of times the
  118. producer of entries into the Ring has looped around the
  119. ring.
  120. At initialization time, this value is set to 0. On the
  121. first loop, this value is set to 1. After the max value is
  122. reached allowed by the number of bits for this field, the
  123. count value continues with 0 again.
  124. In case SW is the consumer of the ring entries, it can
  125. use this field to figure out up to where the producer of
  126. entries has created new entries. This eliminates the need to
  127. check where the head pointer' of the ring is located once
  128. the SW starts processing an interrupt indicating that new
  129. entries have been put into this ring...
  130. Also note that SW if it wants only needs to look at the
  131. LSB bit of this count value.
  132. <legal all>
  133. */
  134. /* Description TCL_GSE_CMD_0_CONTROL_BUFFER_ADDR_31_0
  135. Address (lower 32 bits) of a control buffer containing
  136. additional info needed for this command execution.
  137. <legal all>
  138. */
  139. #define TCL_GSE_CMD_0_CONTROL_BUFFER_ADDR_31_0_OFFSET 0x00000000
  140. #define TCL_GSE_CMD_0_CONTROL_BUFFER_ADDR_31_0_LSB 0
  141. #define TCL_GSE_CMD_0_CONTROL_BUFFER_ADDR_31_0_MASK 0xffffffff
  142. /* Description TCL_GSE_CMD_1_CONTROL_BUFFER_ADDR_39_32
  143. Address (upper 8 bits) of a control buffer containing
  144. additional info needed for this command execution.
  145. <legal all>
  146. */
  147. #define TCL_GSE_CMD_1_CONTROL_BUFFER_ADDR_39_32_OFFSET 0x00000004
  148. #define TCL_GSE_CMD_1_CONTROL_BUFFER_ADDR_39_32_LSB 0
  149. #define TCL_GSE_CMD_1_CONTROL_BUFFER_ADDR_39_32_MASK 0x000000ff
  150. /* Description TCL_GSE_CMD_1_GSE_CTRL
  151. GSE control operations. This includes cache operations
  152. and table entry statistics read/clear operation.
  153. <enum 0 rd_stat> Report or Read statistics
  154. <enum 1 srch_dis> Search disable. Report only Hash
  155. <enum 2 Wr_bk_single> Write Back single entry
  156. <enum 3 wr_bk_all> Write Back entire cache entry
  157. <enum 4 inval_single> Invalidate single cache entry
  158. <enum 5 inval_all> Invalidate entire cache
  159. <enum 6 wr_bk_inval_single> Write back and Invalidate
  160. single entry in cache
  161. <enum 7 wr_bk_inval_all> write back and invalidate
  162. entire cache
  163. <enum 8 clr_stat_single> Clear statistics for single
  164. entry
  165. <legal 0-8>
  166. Rest of the values reserved.
  167. For all single entry control operations (write back,
  168. Invalidate or both)Statistics will be reported
  169. */
  170. #define TCL_GSE_CMD_1_GSE_CTRL_OFFSET 0x00000004
  171. #define TCL_GSE_CMD_1_GSE_CTRL_LSB 8
  172. #define TCL_GSE_CMD_1_GSE_CTRL_MASK 0x00000f00
  173. /* Description TCL_GSE_CMD_1_GSE_SEL
  174. Bit to select the ASE or FSE to do the operation mention
  175. by GSE_ctrl bit
  176. 0: FSE select
  177. 1: ASE select
  178. */
  179. #define TCL_GSE_CMD_1_GSE_SEL_OFFSET 0x00000004
  180. #define TCL_GSE_CMD_1_GSE_SEL_LSB 12
  181. #define TCL_GSE_CMD_1_GSE_SEL_MASK 0x00001000
  182. /* Description TCL_GSE_CMD_1_STATUS_DESTINATION_RING_ID
  183. The TCL status ring to which the GSE status needs to be
  184. send.
  185. <enum 0 tcl_status_0_ring>
  186. <enum 1 tcl_status_1_ring>
  187. <legal all>
  188. */
  189. #define TCL_GSE_CMD_1_STATUS_DESTINATION_RING_ID_OFFSET 0x00000004
  190. #define TCL_GSE_CMD_1_STATUS_DESTINATION_RING_ID_LSB 13
  191. #define TCL_GSE_CMD_1_STATUS_DESTINATION_RING_ID_MASK 0x00002000
  192. /* Description TCL_GSE_CMD_1_SWAP
  193. Bit to enable byte swapping of contents of buffer
  194. <enum 0 Byte_swap_disable >
  195. <enum 1 byte_swap_enable >
  196. <legal all>
  197. */
  198. #define TCL_GSE_CMD_1_SWAP_OFFSET 0x00000004
  199. #define TCL_GSE_CMD_1_SWAP_LSB 14
  200. #define TCL_GSE_CMD_1_SWAP_MASK 0x00004000
  201. /* Description TCL_GSE_CMD_1_RESERVED_1A
  202. <legal 0>
  203. */
  204. #define TCL_GSE_CMD_1_RESERVED_1A_OFFSET 0x00000004
  205. #define TCL_GSE_CMD_1_RESERVED_1A_LSB 15
  206. #define TCL_GSE_CMD_1_RESERVED_1A_MASK 0xffff8000
  207. /* Description TCL_GSE_CMD_2_CMD_META_DATA_31_0
  208. Meta data to be returned in the status descriptor
  209. <legal all>
  210. */
  211. #define TCL_GSE_CMD_2_CMD_META_DATA_31_0_OFFSET 0x00000008
  212. #define TCL_GSE_CMD_2_CMD_META_DATA_31_0_LSB 0
  213. #define TCL_GSE_CMD_2_CMD_META_DATA_31_0_MASK 0xffffffff
  214. /* Description TCL_GSE_CMD_3_CMD_META_DATA_63_32
  215. Meta data to be returned in the status descriptor
  216. <legal all>
  217. */
  218. #define TCL_GSE_CMD_3_CMD_META_DATA_63_32_OFFSET 0x0000000c
  219. #define TCL_GSE_CMD_3_CMD_META_DATA_63_32_LSB 0
  220. #define TCL_GSE_CMD_3_CMD_META_DATA_63_32_MASK 0xffffffff
  221. /* Description TCL_GSE_CMD_4_RESERVED_4A
  222. <legal 0>
  223. */
  224. #define TCL_GSE_CMD_4_RESERVED_4A_OFFSET 0x00000010
  225. #define TCL_GSE_CMD_4_RESERVED_4A_LSB 0
  226. #define TCL_GSE_CMD_4_RESERVED_4A_MASK 0xffffffff
  227. /* Description TCL_GSE_CMD_5_RESERVED_5A
  228. <legal 0>
  229. */
  230. #define TCL_GSE_CMD_5_RESERVED_5A_OFFSET 0x00000014
  231. #define TCL_GSE_CMD_5_RESERVED_5A_LSB 0
  232. #define TCL_GSE_CMD_5_RESERVED_5A_MASK 0xffffffff
  233. /* Description TCL_GSE_CMD_6_RESERVED_6A
  234. <legal 0>
  235. */
  236. #define TCL_GSE_CMD_6_RESERVED_6A_OFFSET 0x00000018
  237. #define TCL_GSE_CMD_6_RESERVED_6A_LSB 0
  238. #define TCL_GSE_CMD_6_RESERVED_6A_MASK 0x000fffff
  239. /* Description TCL_GSE_CMD_6_RING_ID
  240. Helps with debugging when dumping ring contents.
  241. <legal all>
  242. */
  243. #define TCL_GSE_CMD_6_RING_ID_OFFSET 0x00000018
  244. #define TCL_GSE_CMD_6_RING_ID_LSB 20
  245. #define TCL_GSE_CMD_6_RING_ID_MASK 0x0ff00000
  246. /* Description TCL_GSE_CMD_6_LOOPING_COUNT
  247. A count value that indicates the number of times the
  248. producer of entries into the Ring has looped around the
  249. ring.
  250. At initialization time, this value is set to 0. On the
  251. first loop, this value is set to 1. After the max value is
  252. reached allowed by the number of bits for this field, the
  253. count value continues with 0 again.
  254. In case SW is the consumer of the ring entries, it can
  255. use this field to figure out up to where the producer of
  256. entries has created new entries. This eliminates the need to
  257. check where the head pointer' of the ring is located once
  258. the SW starts processing an interrupt indicating that new
  259. entries have been put into this ring...
  260. Also note that SW if it wants only needs to look at the
  261. LSB bit of this count value.
  262. <legal all>
  263. */
  264. #define TCL_GSE_CMD_6_LOOPING_COUNT_OFFSET 0x00000018
  265. #define TCL_GSE_CMD_6_LOOPING_COUNT_LSB 28
  266. #define TCL_GSE_CMD_6_LOOPING_COUNT_MASK 0xf0000000
  267. #endif // _TCL_GSE_CMD_H_