ce_stat_desc.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. /*
  2. * Copyright (c) 2019 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 _CE_STAT_DESC_H_
  22. #define _CE_STAT_DESC_H_
  23. #if !defined(__ASSEMBLER__)
  24. #endif
  25. // ################ START SUMMARY #################
  26. //
  27. // Dword Fields
  28. // 0 ce_res_5[7:0], toeplitz_en[8], src_swap[9], dest_swap[10], gather[11], ce_res_6[15:12], length[31:16]
  29. // 1 toeplitz_hash_0[31:0]
  30. // 2 toeplitz_hash_1[31:0]
  31. // 3 fw_metadata[15:0], ce_res_7[19:16], ring_id[27:20], looping_count[31:28]
  32. //
  33. // ################ END SUMMARY #################
  34. #define NUM_OF_DWORDS_CE_STAT_DESC 4
  35. struct ce_stat_desc {
  36. uint32_t ce_res_5 : 8, //[7:0]
  37. toeplitz_en : 1, //[8]
  38. src_swap : 1, //[9]
  39. dest_swap : 1, //[10]
  40. gather : 1, //[11]
  41. ce_res_6 : 4, //[15:12]
  42. length : 16; //[31:16]
  43. uint32_t toeplitz_hash_0 : 32; //[31:0]
  44. uint32_t toeplitz_hash_1 : 32; //[31:0]
  45. uint32_t fw_metadata : 16, //[15:0]
  46. ce_res_7 : 4, //[19:16]
  47. ring_id : 8, //[27:20]
  48. looping_count : 4; //[31:28]
  49. };
  50. /*
  51. ce_res_5
  52. Reserved
  53. <legal all>
  54. toeplitz_en
  55. <legal all>
  56. src_swap
  57. Source memory buffer swapped
  58. <legal all>
  59. dest_swap
  60. Destination memory buffer swapped
  61. <legal all>
  62. gather
  63. Gather of multiple copy engine source descriptors to one
  64. destination enabled
  65. <legal all>
  66. ce_res_6
  67. Reserved
  68. <legal all>
  69. length
  70. Sum of all the Lengths of the source descriptor in the
  71. gather chain
  72. <legal all>
  73. toeplitz_hash_0
  74. 32 LS bits of 64 bit Toeplitz LFSR hash result
  75. <legal all>
  76. toeplitz_hash_1
  77. 32 MS bits of 64 bit Toeplitz LFSR hash result
  78. <legal all>
  79. fw_metadata
  80. Meta data used by FW
  81. In case of gather field in first source ring entry of
  82. the gather copy cycle in taken into account.
  83. <legal all>
  84. ce_res_7
  85. Reserved
  86. <legal all>
  87. ring_id
  88. The buffer pointer ring ID.
  89. 0 refers to the IDLE ring
  90. 1 - N refers to other rings
  91. Helps with debugging when dumping ring contents.
  92. <legal all>
  93. looping_count
  94. A count value that indicates the number of times the
  95. producer of entries into the Ring has looped around the
  96. ring.
  97. At initialization time, this value is set to 0. On the
  98. first loop, this value is set to 1. After the max value is
  99. reached allowed by the number of bits for this field, the
  100. count value continues with 0 again.
  101. In case SW is the consumer of the ring entries, it can
  102. use this field to figure out up to where the producer of
  103. entries has created new entries. This eliminates the need to
  104. check where the head pointer' of the ring is located once
  105. the SW starts processing an interrupt indicating that new
  106. entries have been put into this ring...
  107. Also note that SW if it wants only needs to look at the
  108. LSB bit of this count value.
  109. <legal all>
  110. */
  111. /* Description CE_STAT_DESC_0_CE_RES_5
  112. Reserved
  113. <legal all>
  114. */
  115. #define CE_STAT_DESC_0_CE_RES_5_OFFSET 0x00000000
  116. #define CE_STAT_DESC_0_CE_RES_5_LSB 0
  117. #define CE_STAT_DESC_0_CE_RES_5_MASK 0x000000ff
  118. /* Description CE_STAT_DESC_0_TOEPLITZ_EN
  119. <legal all>
  120. */
  121. #define CE_STAT_DESC_0_TOEPLITZ_EN_OFFSET 0x00000000
  122. #define CE_STAT_DESC_0_TOEPLITZ_EN_LSB 8
  123. #define CE_STAT_DESC_0_TOEPLITZ_EN_MASK 0x00000100
  124. /* Description CE_STAT_DESC_0_SRC_SWAP
  125. Source memory buffer swapped
  126. <legal all>
  127. */
  128. #define CE_STAT_DESC_0_SRC_SWAP_OFFSET 0x00000000
  129. #define CE_STAT_DESC_0_SRC_SWAP_LSB 9
  130. #define CE_STAT_DESC_0_SRC_SWAP_MASK 0x00000200
  131. /* Description CE_STAT_DESC_0_DEST_SWAP
  132. Destination memory buffer swapped
  133. <legal all>
  134. */
  135. #define CE_STAT_DESC_0_DEST_SWAP_OFFSET 0x00000000
  136. #define CE_STAT_DESC_0_DEST_SWAP_LSB 10
  137. #define CE_STAT_DESC_0_DEST_SWAP_MASK 0x00000400
  138. /* Description CE_STAT_DESC_0_GATHER
  139. Gather of multiple copy engine source descriptors to one
  140. destination enabled
  141. <legal all>
  142. */
  143. #define CE_STAT_DESC_0_GATHER_OFFSET 0x00000000
  144. #define CE_STAT_DESC_0_GATHER_LSB 11
  145. #define CE_STAT_DESC_0_GATHER_MASK 0x00000800
  146. /* Description CE_STAT_DESC_0_CE_RES_6
  147. Reserved
  148. <legal all>
  149. */
  150. #define CE_STAT_DESC_0_CE_RES_6_OFFSET 0x00000000
  151. #define CE_STAT_DESC_0_CE_RES_6_LSB 12
  152. #define CE_STAT_DESC_0_CE_RES_6_MASK 0x0000f000
  153. /* Description CE_STAT_DESC_0_LENGTH
  154. Sum of all the Lengths of the source descriptor in the
  155. gather chain
  156. <legal all>
  157. */
  158. #define CE_STAT_DESC_0_LENGTH_OFFSET 0x00000000
  159. #define CE_STAT_DESC_0_LENGTH_LSB 16
  160. #define CE_STAT_DESC_0_LENGTH_MASK 0xffff0000
  161. /* Description CE_STAT_DESC_1_TOEPLITZ_HASH_0
  162. 32 LS bits of 64 bit Toeplitz LFSR hash result
  163. <legal all>
  164. */
  165. #define CE_STAT_DESC_1_TOEPLITZ_HASH_0_OFFSET 0x00000004
  166. #define CE_STAT_DESC_1_TOEPLITZ_HASH_0_LSB 0
  167. #define CE_STAT_DESC_1_TOEPLITZ_HASH_0_MASK 0xffffffff
  168. /* Description CE_STAT_DESC_2_TOEPLITZ_HASH_1
  169. 32 MS bits of 64 bit Toeplitz LFSR hash result
  170. <legal all>
  171. */
  172. #define CE_STAT_DESC_2_TOEPLITZ_HASH_1_OFFSET 0x00000008
  173. #define CE_STAT_DESC_2_TOEPLITZ_HASH_1_LSB 0
  174. #define CE_STAT_DESC_2_TOEPLITZ_HASH_1_MASK 0xffffffff
  175. /* Description CE_STAT_DESC_3_FW_METADATA
  176. Meta data used by FW
  177. In case of gather field in first source ring entry of
  178. the gather copy cycle in taken into account.
  179. <legal all>
  180. */
  181. #define CE_STAT_DESC_3_FW_METADATA_OFFSET 0x0000000c
  182. #define CE_STAT_DESC_3_FW_METADATA_LSB 0
  183. #define CE_STAT_DESC_3_FW_METADATA_MASK 0x0000ffff
  184. /* Description CE_STAT_DESC_3_CE_RES_7
  185. Reserved
  186. <legal all>
  187. */
  188. #define CE_STAT_DESC_3_CE_RES_7_OFFSET 0x0000000c
  189. #define CE_STAT_DESC_3_CE_RES_7_LSB 16
  190. #define CE_STAT_DESC_3_CE_RES_7_MASK 0x000f0000
  191. /* Description CE_STAT_DESC_3_RING_ID
  192. The buffer pointer ring ID.
  193. 0 refers to the IDLE ring
  194. 1 - N refers to other rings
  195. Helps with debugging when dumping ring contents.
  196. <legal all>
  197. */
  198. #define CE_STAT_DESC_3_RING_ID_OFFSET 0x0000000c
  199. #define CE_STAT_DESC_3_RING_ID_LSB 20
  200. #define CE_STAT_DESC_3_RING_ID_MASK 0x0ff00000
  201. /* Description CE_STAT_DESC_3_LOOPING_COUNT
  202. A count value that indicates the number of times the
  203. producer of entries into the Ring has looped around the
  204. ring.
  205. At initialization time, this value is set to 0. On the
  206. first loop, this value is set to 1. After the max value is
  207. reached allowed by the number of bits for this field, the
  208. count value continues with 0 again.
  209. In case SW is the consumer of the ring entries, it can
  210. use this field to figure out up to where the producer of
  211. entries has created new entries. This eliminates the need to
  212. check where the head pointer' of the ring is located once
  213. the SW starts processing an interrupt indicating that new
  214. entries have been put into this ring...
  215. Also note that SW if it wants only needs to look at the
  216. LSB bit of this count value.
  217. <legal all>
  218. */
  219. #define CE_STAT_DESC_3_LOOPING_COUNT_OFFSET 0x0000000c
  220. #define CE_STAT_DESC_3_LOOPING_COUNT_LSB 28
  221. #define CE_STAT_DESC_3_LOOPING_COUNT_MASK 0xf0000000
  222. #endif // _CE_STAT_DESC_H_