reo_flush_queue.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
  2. *
  3. * Permission to use, copy, modify, and/or distribute this software for any
  4. * purpose with or without fee is hereby granted, provided that the above
  5. * copyright notice and this permission notice appear in all copies.
  6. *
  7. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  8. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  9. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  10. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  11. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  12. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  13. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  14. */
  15. #ifndef _REO_FLUSH_QUEUE_H_
  16. #define _REO_FLUSH_QUEUE_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #include "uniform_reo_cmd_header.h"
  20. #define NUM_OF_DWORDS_REO_FLUSH_QUEUE 10
  21. #define NUM_OF_QWORDS_REO_FLUSH_QUEUE 5
  22. struct reo_flush_queue {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. struct uniform_reo_cmd_header cmd_header;
  25. uint32_t flush_desc_addr_31_0 : 32; // [31:0]
  26. uint32_t flush_desc_addr_39_32 : 8, // [7:0]
  27. block_desc_addr_usage_after_flush : 1, // [8:8]
  28. block_resource_index : 2, // [10:9]
  29. reserved_2a : 21; // [31:11]
  30. uint32_t reserved_3a : 32; // [31:0]
  31. uint32_t reserved_4a : 32; // [31:0]
  32. uint32_t reserved_5a : 32; // [31:0]
  33. uint32_t reserved_6a : 32; // [31:0]
  34. uint32_t reserved_7a : 32; // [31:0]
  35. uint32_t reserved_8a : 32; // [31:0]
  36. uint32_t tlv64_padding : 32; // [31:0]
  37. #else
  38. struct uniform_reo_cmd_header cmd_header;
  39. uint32_t flush_desc_addr_31_0 : 32; // [31:0]
  40. uint32_t reserved_2a : 21, // [31:11]
  41. block_resource_index : 2, // [10:9]
  42. block_desc_addr_usage_after_flush : 1, // [8:8]
  43. flush_desc_addr_39_32 : 8; // [7:0]
  44. uint32_t reserved_3a : 32; // [31:0]
  45. uint32_t reserved_4a : 32; // [31:0]
  46. uint32_t reserved_5a : 32; // [31:0]
  47. uint32_t reserved_6a : 32; // [31:0]
  48. uint32_t reserved_7a : 32; // [31:0]
  49. uint32_t reserved_8a : 32; // [31:0]
  50. uint32_t tlv64_padding : 32; // [31:0]
  51. #endif
  52. };
  53. /* Description CMD_HEADER
  54. Consumer: REO
  55. Producer: SW
  56. Details for command execution tracking purposes.
  57. */
  58. /* Description REO_CMD_NUMBER
  59. Consumer: REO/SW/DEBUG
  60. Producer: SW
  61. This number can be used by SW to track, identify and link
  62. the created commands with the command statusses
  63. <legal all>
  64. */
  65. #define REO_FLUSH_QUEUE_CMD_HEADER_REO_CMD_NUMBER_OFFSET 0x0000000000000000
  66. #define REO_FLUSH_QUEUE_CMD_HEADER_REO_CMD_NUMBER_LSB 0
  67. #define REO_FLUSH_QUEUE_CMD_HEADER_REO_CMD_NUMBER_MSB 15
  68. #define REO_FLUSH_QUEUE_CMD_HEADER_REO_CMD_NUMBER_MASK 0x000000000000ffff
  69. /* Description REO_STATUS_REQUIRED
  70. Consumer: REO
  71. Producer: SW
  72. <enum 0 NoStatus> REO does not need to generate a status
  73. TLV for the execution of this command
  74. <enum 1 StatusRequired> REO shall generate a status TLV
  75. for the execution of this command
  76. <legal all>
  77. */
  78. #define REO_FLUSH_QUEUE_CMD_HEADER_REO_STATUS_REQUIRED_OFFSET 0x0000000000000000
  79. #define REO_FLUSH_QUEUE_CMD_HEADER_REO_STATUS_REQUIRED_LSB 16
  80. #define REO_FLUSH_QUEUE_CMD_HEADER_REO_STATUS_REQUIRED_MSB 16
  81. #define REO_FLUSH_QUEUE_CMD_HEADER_REO_STATUS_REQUIRED_MASK 0x0000000000010000
  82. /* Description RESERVED_0A
  83. <legal 0>
  84. */
  85. #define REO_FLUSH_QUEUE_CMD_HEADER_RESERVED_0A_OFFSET 0x0000000000000000
  86. #define REO_FLUSH_QUEUE_CMD_HEADER_RESERVED_0A_LSB 17
  87. #define REO_FLUSH_QUEUE_CMD_HEADER_RESERVED_0A_MSB 31
  88. #define REO_FLUSH_QUEUE_CMD_HEADER_RESERVED_0A_MASK 0x00000000fffe0000
  89. /* Description FLUSH_DESC_ADDR_31_0
  90. Consumer: REO
  91. Producer: SW
  92. Address (lower 32 bits) of the descriptor to flush
  93. <legal all>
  94. */
  95. #define REO_FLUSH_QUEUE_FLUSH_DESC_ADDR_31_0_OFFSET 0x0000000000000000
  96. #define REO_FLUSH_QUEUE_FLUSH_DESC_ADDR_31_0_LSB 32
  97. #define REO_FLUSH_QUEUE_FLUSH_DESC_ADDR_31_0_MSB 63
  98. #define REO_FLUSH_QUEUE_FLUSH_DESC_ADDR_31_0_MASK 0xffffffff00000000
  99. /* Description FLUSH_DESC_ADDR_39_32
  100. Consumer: REO
  101. Producer: SW
  102. Address (upper 8 bits) of the descriptor to flush
  103. <legal all>
  104. */
  105. #define REO_FLUSH_QUEUE_FLUSH_DESC_ADDR_39_32_OFFSET 0x0000000000000008
  106. #define REO_FLUSH_QUEUE_FLUSH_DESC_ADDR_39_32_LSB 0
  107. #define REO_FLUSH_QUEUE_FLUSH_DESC_ADDR_39_32_MSB 7
  108. #define REO_FLUSH_QUEUE_FLUSH_DESC_ADDR_39_32_MASK 0x00000000000000ff
  109. /* Description BLOCK_DESC_ADDR_USAGE_AFTER_FLUSH
  110. When set, REO shall not re-fetch this address till SW explicitly
  111. unblocked this address
  112. If the blocking resource was already used, this command
  113. shall fail and an error is reported
  114. <legal all>
  115. */
  116. #define REO_FLUSH_QUEUE_BLOCK_DESC_ADDR_USAGE_AFTER_FLUSH_OFFSET 0x0000000000000008
  117. #define REO_FLUSH_QUEUE_BLOCK_DESC_ADDR_USAGE_AFTER_FLUSH_LSB 8
  118. #define REO_FLUSH_QUEUE_BLOCK_DESC_ADDR_USAGE_AFTER_FLUSH_MSB 8
  119. #define REO_FLUSH_QUEUE_BLOCK_DESC_ADDR_USAGE_AFTER_FLUSH_MASK 0x0000000000000100
  120. /* Description BLOCK_RESOURCE_INDEX
  121. Field only valid when 'Block_desc_addr_usage_after_flush
  122. ' is set.
  123. Indicates which of the four blocking resources in REO will
  124. be assigned for managing the blocking of this address.
  125. <legal all>
  126. */
  127. #define REO_FLUSH_QUEUE_BLOCK_RESOURCE_INDEX_OFFSET 0x0000000000000008
  128. #define REO_FLUSH_QUEUE_BLOCK_RESOURCE_INDEX_LSB 9
  129. #define REO_FLUSH_QUEUE_BLOCK_RESOURCE_INDEX_MSB 10
  130. #define REO_FLUSH_QUEUE_BLOCK_RESOURCE_INDEX_MASK 0x0000000000000600
  131. /* Description RESERVED_2A
  132. <legal 0>
  133. */
  134. #define REO_FLUSH_QUEUE_RESERVED_2A_OFFSET 0x0000000000000008
  135. #define REO_FLUSH_QUEUE_RESERVED_2A_LSB 11
  136. #define REO_FLUSH_QUEUE_RESERVED_2A_MSB 31
  137. #define REO_FLUSH_QUEUE_RESERVED_2A_MASK 0x00000000fffff800
  138. /* Description RESERVED_3A
  139. <legal 0>
  140. */
  141. #define REO_FLUSH_QUEUE_RESERVED_3A_OFFSET 0x0000000000000008
  142. #define REO_FLUSH_QUEUE_RESERVED_3A_LSB 32
  143. #define REO_FLUSH_QUEUE_RESERVED_3A_MSB 63
  144. #define REO_FLUSH_QUEUE_RESERVED_3A_MASK 0xffffffff00000000
  145. /* Description RESERVED_4A
  146. <legal 0>
  147. */
  148. #define REO_FLUSH_QUEUE_RESERVED_4A_OFFSET 0x0000000000000010
  149. #define REO_FLUSH_QUEUE_RESERVED_4A_LSB 0
  150. #define REO_FLUSH_QUEUE_RESERVED_4A_MSB 31
  151. #define REO_FLUSH_QUEUE_RESERVED_4A_MASK 0x00000000ffffffff
  152. /* Description RESERVED_5A
  153. <legal 0>
  154. */
  155. #define REO_FLUSH_QUEUE_RESERVED_5A_OFFSET 0x0000000000000010
  156. #define REO_FLUSH_QUEUE_RESERVED_5A_LSB 32
  157. #define REO_FLUSH_QUEUE_RESERVED_5A_MSB 63
  158. #define REO_FLUSH_QUEUE_RESERVED_5A_MASK 0xffffffff00000000
  159. /* Description RESERVED_6A
  160. <legal 0>
  161. */
  162. #define REO_FLUSH_QUEUE_RESERVED_6A_OFFSET 0x0000000000000018
  163. #define REO_FLUSH_QUEUE_RESERVED_6A_LSB 0
  164. #define REO_FLUSH_QUEUE_RESERVED_6A_MSB 31
  165. #define REO_FLUSH_QUEUE_RESERVED_6A_MASK 0x00000000ffffffff
  166. /* Description RESERVED_7A
  167. <legal 0>
  168. */
  169. #define REO_FLUSH_QUEUE_RESERVED_7A_OFFSET 0x0000000000000018
  170. #define REO_FLUSH_QUEUE_RESERVED_7A_LSB 32
  171. #define REO_FLUSH_QUEUE_RESERVED_7A_MSB 63
  172. #define REO_FLUSH_QUEUE_RESERVED_7A_MASK 0xffffffff00000000
  173. /* Description RESERVED_8A
  174. <legal 0>
  175. */
  176. #define REO_FLUSH_QUEUE_RESERVED_8A_OFFSET 0x0000000000000020
  177. #define REO_FLUSH_QUEUE_RESERVED_8A_LSB 0
  178. #define REO_FLUSH_QUEUE_RESERVED_8A_MSB 31
  179. #define REO_FLUSH_QUEUE_RESERVED_8A_MASK 0x00000000ffffffff
  180. /* Description TLV64_PADDING
  181. Automatic DWORD padding inserted while converting TLV32
  182. to TLV64 for 64 bit ARCH
  183. <legal 0>
  184. */
  185. #define REO_FLUSH_QUEUE_TLV64_PADDING_OFFSET 0x0000000000000020
  186. #define REO_FLUSH_QUEUE_TLV64_PADDING_LSB 32
  187. #define REO_FLUSH_QUEUE_TLV64_PADDING_MSB 63
  188. #define REO_FLUSH_QUEUE_TLV64_PADDING_MASK 0xffffffff00000000
  189. #endif // REO_FLUSH_QUEUE