reo_flush_queue.h 11 KB

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