tcl_gse_cmd.h 12 KB

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