reo_flush_queue_status.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  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_STATUS_H_
  16. #define _REO_FLUSH_QUEUE_STATUS_H_
  17. #if !defined(__ASSEMBLER__)
  18. #endif
  19. #include "uniform_reo_status_header.h"
  20. #define NUM_OF_DWORDS_REO_FLUSH_QUEUE_STATUS 26
  21. #define NUM_OF_QWORDS_REO_FLUSH_QUEUE_STATUS 13
  22. struct reo_flush_queue_status {
  23. #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
  24. struct uniform_reo_status_header status_header;
  25. uint32_t error_detected : 1, // [0:0]
  26. reserved_2a : 31; // [31:1]
  27. uint32_t reserved_3a : 32; // [31:0]
  28. uint32_t reserved_4a : 32; // [31:0]
  29. uint32_t reserved_5a : 32; // [31:0]
  30. uint32_t reserved_6a : 32; // [31:0]
  31. uint32_t reserved_7a : 32; // [31:0]
  32. uint32_t reserved_8a : 32; // [31:0]
  33. uint32_t reserved_9a : 32; // [31:0]
  34. uint32_t reserved_10a : 32; // [31:0]
  35. uint32_t reserved_11a : 32; // [31:0]
  36. uint32_t reserved_12a : 32; // [31:0]
  37. uint32_t reserved_13a : 32; // [31:0]
  38. uint32_t reserved_14a : 32; // [31:0]
  39. uint32_t reserved_15a : 32; // [31:0]
  40. uint32_t reserved_16a : 32; // [31:0]
  41. uint32_t reserved_17a : 32; // [31:0]
  42. uint32_t reserved_18a : 32; // [31:0]
  43. uint32_t reserved_19a : 32; // [31:0]
  44. uint32_t reserved_20a : 32; // [31:0]
  45. uint32_t reserved_21a : 32; // [31:0]
  46. uint32_t reserved_22a : 32; // [31:0]
  47. uint32_t reserved_23a : 32; // [31:0]
  48. uint32_t reserved_24a : 32; // [31:0]
  49. uint32_t reserved_25a : 28, // [27:0]
  50. looping_count : 4; // [31:28]
  51. #else
  52. struct uniform_reo_status_header status_header;
  53. uint32_t reserved_2a : 31, // [31:1]
  54. error_detected : 1; // [0:0]
  55. uint32_t reserved_3a : 32; // [31:0]
  56. uint32_t reserved_4a : 32; // [31:0]
  57. uint32_t reserved_5a : 32; // [31:0]
  58. uint32_t reserved_6a : 32; // [31:0]
  59. uint32_t reserved_7a : 32; // [31:0]
  60. uint32_t reserved_8a : 32; // [31:0]
  61. uint32_t reserved_9a : 32; // [31:0]
  62. uint32_t reserved_10a : 32; // [31:0]
  63. uint32_t reserved_11a : 32; // [31:0]
  64. uint32_t reserved_12a : 32; // [31:0]
  65. uint32_t reserved_13a : 32; // [31:0]
  66. uint32_t reserved_14a : 32; // [31:0]
  67. uint32_t reserved_15a : 32; // [31:0]
  68. uint32_t reserved_16a : 32; // [31:0]
  69. uint32_t reserved_17a : 32; // [31:0]
  70. uint32_t reserved_18a : 32; // [31:0]
  71. uint32_t reserved_19a : 32; // [31:0]
  72. uint32_t reserved_20a : 32; // [31:0]
  73. uint32_t reserved_21a : 32; // [31:0]
  74. uint32_t reserved_22a : 32; // [31:0]
  75. uint32_t reserved_23a : 32; // [31:0]
  76. uint32_t reserved_24a : 32; // [31:0]
  77. uint32_t looping_count : 4, // [31:28]
  78. reserved_25a : 28; // [27:0]
  79. #endif
  80. };
  81. /* Description STATUS_HEADER
  82. Consumer: SW
  83. Producer: REO
  84. Details that can link this status with the original command.
  85. It also contains info on how long REO took to execute this
  86. command.
  87. */
  88. /* Description REO_STATUS_NUMBER
  89. Consumer: SW , DEBUG
  90. Producer: REO
  91. The value in this field is equal to value of the 'REO_CMD_Number'
  92. field the REO command
  93. This field helps to correlate the statuses with the REO
  94. commands.
  95. <legal all>
  96. */
  97. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_REO_STATUS_NUMBER_OFFSET 0x0000000000000000
  98. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_REO_STATUS_NUMBER_LSB 0
  99. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_REO_STATUS_NUMBER_MSB 15
  100. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_REO_STATUS_NUMBER_MASK 0x000000000000ffff
  101. /* Description CMD_EXECUTION_TIME
  102. Consumer: DEBUG
  103. Producer: REO
  104. The amount of time REO took to excecute the command. Note
  105. that this time does not include the duration of the command
  106. waiting in the command ring, before the execution started.
  107. In us.
  108. <legal all>
  109. */
  110. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_CMD_EXECUTION_TIME_OFFSET 0x0000000000000000
  111. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_CMD_EXECUTION_TIME_LSB 16
  112. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_CMD_EXECUTION_TIME_MSB 25
  113. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_CMD_EXECUTION_TIME_MASK 0x0000000003ff0000
  114. /* Description REO_CMD_EXECUTION_STATUS
  115. Consumer: DEBUG
  116. Producer: REO
  117. Execution status of the command.
  118. <enum 0 reo_successful_execution> Command has successfully
  119. be executed
  120. <enum 1 reo_blocked_execution> Command could not be executed
  121. as the queue or cache was blocked
  122. <enum 2 reo_failed_execution> Command has encountered problems
  123. when executing, like the queue descriptor not being valid.
  124. None of the status fields in the entire STATUS TLV are valid.
  125. <enum 3 reo_resource_blocked> Command is NOT executed because
  126. one or more descriptors were blocked. This is SW programming
  127. mistake.
  128. None of the status fields in the entire STATUS TLV are valid.
  129. <legal 0-3>
  130. */
  131. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_OFFSET 0x0000000000000000
  132. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_LSB 26
  133. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MSB 27
  134. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_REO_CMD_EXECUTION_STATUS_MASK 0x000000000c000000
  135. /* Description RESERVED_0A
  136. <legal 0>
  137. */
  138. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_RESERVED_0A_OFFSET 0x0000000000000000
  139. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_RESERVED_0A_LSB 28
  140. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_RESERVED_0A_MSB 31
  141. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_RESERVED_0A_MASK 0x00000000f0000000
  142. /* Description TIMESTAMP
  143. Timestamp at the moment that this status report is written.
  144. <legal all>
  145. */
  146. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_TIMESTAMP_OFFSET 0x0000000000000000
  147. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_TIMESTAMP_LSB 32
  148. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_TIMESTAMP_MSB 63
  149. #define REO_FLUSH_QUEUE_STATUS_STATUS_HEADER_TIMESTAMP_MASK 0xffffffff00000000
  150. /* Description ERROR_DETECTED
  151. Status of the blocking resource
  152. 0: No error has been detected while executing this command
  153. 1: Error detected: The resource to be used for blocking
  154. was already in use.
  155. */
  156. #define REO_FLUSH_QUEUE_STATUS_ERROR_DETECTED_OFFSET 0x0000000000000008
  157. #define REO_FLUSH_QUEUE_STATUS_ERROR_DETECTED_LSB 0
  158. #define REO_FLUSH_QUEUE_STATUS_ERROR_DETECTED_MSB 0
  159. #define REO_FLUSH_QUEUE_STATUS_ERROR_DETECTED_MASK 0x0000000000000001
  160. /* Description RESERVED_2A
  161. <legal 0>
  162. */
  163. #define REO_FLUSH_QUEUE_STATUS_RESERVED_2A_OFFSET 0x0000000000000008
  164. #define REO_FLUSH_QUEUE_STATUS_RESERVED_2A_LSB 1
  165. #define REO_FLUSH_QUEUE_STATUS_RESERVED_2A_MSB 31
  166. #define REO_FLUSH_QUEUE_STATUS_RESERVED_2A_MASK 0x00000000fffffffe
  167. /* Description RESERVED_3A
  168. <legal 0>
  169. */
  170. #define REO_FLUSH_QUEUE_STATUS_RESERVED_3A_OFFSET 0x0000000000000008
  171. #define REO_FLUSH_QUEUE_STATUS_RESERVED_3A_LSB 32
  172. #define REO_FLUSH_QUEUE_STATUS_RESERVED_3A_MSB 63
  173. #define REO_FLUSH_QUEUE_STATUS_RESERVED_3A_MASK 0xffffffff00000000
  174. /* Description RESERVED_4A
  175. <legal 0>
  176. */
  177. #define REO_FLUSH_QUEUE_STATUS_RESERVED_4A_OFFSET 0x0000000000000010
  178. #define REO_FLUSH_QUEUE_STATUS_RESERVED_4A_LSB 0
  179. #define REO_FLUSH_QUEUE_STATUS_RESERVED_4A_MSB 31
  180. #define REO_FLUSH_QUEUE_STATUS_RESERVED_4A_MASK 0x00000000ffffffff
  181. /* Description RESERVED_5A
  182. <legal 0>
  183. */
  184. #define REO_FLUSH_QUEUE_STATUS_RESERVED_5A_OFFSET 0x0000000000000010
  185. #define REO_FLUSH_QUEUE_STATUS_RESERVED_5A_LSB 32
  186. #define REO_FLUSH_QUEUE_STATUS_RESERVED_5A_MSB 63
  187. #define REO_FLUSH_QUEUE_STATUS_RESERVED_5A_MASK 0xffffffff00000000
  188. /* Description RESERVED_6A
  189. <legal 0>
  190. */
  191. #define REO_FLUSH_QUEUE_STATUS_RESERVED_6A_OFFSET 0x0000000000000018
  192. #define REO_FLUSH_QUEUE_STATUS_RESERVED_6A_LSB 0
  193. #define REO_FLUSH_QUEUE_STATUS_RESERVED_6A_MSB 31
  194. #define REO_FLUSH_QUEUE_STATUS_RESERVED_6A_MASK 0x00000000ffffffff
  195. /* Description RESERVED_7A
  196. <legal 0>
  197. */
  198. #define REO_FLUSH_QUEUE_STATUS_RESERVED_7A_OFFSET 0x0000000000000018
  199. #define REO_FLUSH_QUEUE_STATUS_RESERVED_7A_LSB 32
  200. #define REO_FLUSH_QUEUE_STATUS_RESERVED_7A_MSB 63
  201. #define REO_FLUSH_QUEUE_STATUS_RESERVED_7A_MASK 0xffffffff00000000
  202. /* Description RESERVED_8A
  203. <legal 0>
  204. */
  205. #define REO_FLUSH_QUEUE_STATUS_RESERVED_8A_OFFSET 0x0000000000000020
  206. #define REO_FLUSH_QUEUE_STATUS_RESERVED_8A_LSB 0
  207. #define REO_FLUSH_QUEUE_STATUS_RESERVED_8A_MSB 31
  208. #define REO_FLUSH_QUEUE_STATUS_RESERVED_8A_MASK 0x00000000ffffffff
  209. /* Description RESERVED_9A
  210. <legal 0>
  211. */
  212. #define REO_FLUSH_QUEUE_STATUS_RESERVED_9A_OFFSET 0x0000000000000020
  213. #define REO_FLUSH_QUEUE_STATUS_RESERVED_9A_LSB 32
  214. #define REO_FLUSH_QUEUE_STATUS_RESERVED_9A_MSB 63
  215. #define REO_FLUSH_QUEUE_STATUS_RESERVED_9A_MASK 0xffffffff00000000
  216. /* Description RESERVED_10A
  217. <legal 0>
  218. */
  219. #define REO_FLUSH_QUEUE_STATUS_RESERVED_10A_OFFSET 0x0000000000000028
  220. #define REO_FLUSH_QUEUE_STATUS_RESERVED_10A_LSB 0
  221. #define REO_FLUSH_QUEUE_STATUS_RESERVED_10A_MSB 31
  222. #define REO_FLUSH_QUEUE_STATUS_RESERVED_10A_MASK 0x00000000ffffffff
  223. /* Description RESERVED_11A
  224. <legal 0>
  225. */
  226. #define REO_FLUSH_QUEUE_STATUS_RESERVED_11A_OFFSET 0x0000000000000028
  227. #define REO_FLUSH_QUEUE_STATUS_RESERVED_11A_LSB 32
  228. #define REO_FLUSH_QUEUE_STATUS_RESERVED_11A_MSB 63
  229. #define REO_FLUSH_QUEUE_STATUS_RESERVED_11A_MASK 0xffffffff00000000
  230. /* Description RESERVED_12A
  231. <legal 0>
  232. */
  233. #define REO_FLUSH_QUEUE_STATUS_RESERVED_12A_OFFSET 0x0000000000000030
  234. #define REO_FLUSH_QUEUE_STATUS_RESERVED_12A_LSB 0
  235. #define REO_FLUSH_QUEUE_STATUS_RESERVED_12A_MSB 31
  236. #define REO_FLUSH_QUEUE_STATUS_RESERVED_12A_MASK 0x00000000ffffffff
  237. /* Description RESERVED_13A
  238. <legal 0>
  239. */
  240. #define REO_FLUSH_QUEUE_STATUS_RESERVED_13A_OFFSET 0x0000000000000030
  241. #define REO_FLUSH_QUEUE_STATUS_RESERVED_13A_LSB 32
  242. #define REO_FLUSH_QUEUE_STATUS_RESERVED_13A_MSB 63
  243. #define REO_FLUSH_QUEUE_STATUS_RESERVED_13A_MASK 0xffffffff00000000
  244. /* Description RESERVED_14A
  245. <legal 0>
  246. */
  247. #define REO_FLUSH_QUEUE_STATUS_RESERVED_14A_OFFSET 0x0000000000000038
  248. #define REO_FLUSH_QUEUE_STATUS_RESERVED_14A_LSB 0
  249. #define REO_FLUSH_QUEUE_STATUS_RESERVED_14A_MSB 31
  250. #define REO_FLUSH_QUEUE_STATUS_RESERVED_14A_MASK 0x00000000ffffffff
  251. /* Description RESERVED_15A
  252. <legal 0>
  253. */
  254. #define REO_FLUSH_QUEUE_STATUS_RESERVED_15A_OFFSET 0x0000000000000038
  255. #define REO_FLUSH_QUEUE_STATUS_RESERVED_15A_LSB 32
  256. #define REO_FLUSH_QUEUE_STATUS_RESERVED_15A_MSB 63
  257. #define REO_FLUSH_QUEUE_STATUS_RESERVED_15A_MASK 0xffffffff00000000
  258. /* Description RESERVED_16A
  259. <legal 0>
  260. */
  261. #define REO_FLUSH_QUEUE_STATUS_RESERVED_16A_OFFSET 0x0000000000000040
  262. #define REO_FLUSH_QUEUE_STATUS_RESERVED_16A_LSB 0
  263. #define REO_FLUSH_QUEUE_STATUS_RESERVED_16A_MSB 31
  264. #define REO_FLUSH_QUEUE_STATUS_RESERVED_16A_MASK 0x00000000ffffffff
  265. /* Description RESERVED_17A
  266. <legal 0>
  267. */
  268. #define REO_FLUSH_QUEUE_STATUS_RESERVED_17A_OFFSET 0x0000000000000040
  269. #define REO_FLUSH_QUEUE_STATUS_RESERVED_17A_LSB 32
  270. #define REO_FLUSH_QUEUE_STATUS_RESERVED_17A_MSB 63
  271. #define REO_FLUSH_QUEUE_STATUS_RESERVED_17A_MASK 0xffffffff00000000
  272. /* Description RESERVED_18A
  273. <legal 0>
  274. */
  275. #define REO_FLUSH_QUEUE_STATUS_RESERVED_18A_OFFSET 0x0000000000000048
  276. #define REO_FLUSH_QUEUE_STATUS_RESERVED_18A_LSB 0
  277. #define REO_FLUSH_QUEUE_STATUS_RESERVED_18A_MSB 31
  278. #define REO_FLUSH_QUEUE_STATUS_RESERVED_18A_MASK 0x00000000ffffffff
  279. /* Description RESERVED_19A
  280. <legal 0>
  281. */
  282. #define REO_FLUSH_QUEUE_STATUS_RESERVED_19A_OFFSET 0x0000000000000048
  283. #define REO_FLUSH_QUEUE_STATUS_RESERVED_19A_LSB 32
  284. #define REO_FLUSH_QUEUE_STATUS_RESERVED_19A_MSB 63
  285. #define REO_FLUSH_QUEUE_STATUS_RESERVED_19A_MASK 0xffffffff00000000
  286. /* Description RESERVED_20A
  287. <legal 0>
  288. */
  289. #define REO_FLUSH_QUEUE_STATUS_RESERVED_20A_OFFSET 0x0000000000000050
  290. #define REO_FLUSH_QUEUE_STATUS_RESERVED_20A_LSB 0
  291. #define REO_FLUSH_QUEUE_STATUS_RESERVED_20A_MSB 31
  292. #define REO_FLUSH_QUEUE_STATUS_RESERVED_20A_MASK 0x00000000ffffffff
  293. /* Description RESERVED_21A
  294. <legal 0>
  295. */
  296. #define REO_FLUSH_QUEUE_STATUS_RESERVED_21A_OFFSET 0x0000000000000050
  297. #define REO_FLUSH_QUEUE_STATUS_RESERVED_21A_LSB 32
  298. #define REO_FLUSH_QUEUE_STATUS_RESERVED_21A_MSB 63
  299. #define REO_FLUSH_QUEUE_STATUS_RESERVED_21A_MASK 0xffffffff00000000
  300. /* Description RESERVED_22A
  301. <legal 0>
  302. */
  303. #define REO_FLUSH_QUEUE_STATUS_RESERVED_22A_OFFSET 0x0000000000000058
  304. #define REO_FLUSH_QUEUE_STATUS_RESERVED_22A_LSB 0
  305. #define REO_FLUSH_QUEUE_STATUS_RESERVED_22A_MSB 31
  306. #define REO_FLUSH_QUEUE_STATUS_RESERVED_22A_MASK 0x00000000ffffffff
  307. /* Description RESERVED_23A
  308. <legal 0>
  309. */
  310. #define REO_FLUSH_QUEUE_STATUS_RESERVED_23A_OFFSET 0x0000000000000058
  311. #define REO_FLUSH_QUEUE_STATUS_RESERVED_23A_LSB 32
  312. #define REO_FLUSH_QUEUE_STATUS_RESERVED_23A_MSB 63
  313. #define REO_FLUSH_QUEUE_STATUS_RESERVED_23A_MASK 0xffffffff00000000
  314. /* Description RESERVED_24A
  315. <legal 0>
  316. */
  317. #define REO_FLUSH_QUEUE_STATUS_RESERVED_24A_OFFSET 0x0000000000000060
  318. #define REO_FLUSH_QUEUE_STATUS_RESERVED_24A_LSB 0
  319. #define REO_FLUSH_QUEUE_STATUS_RESERVED_24A_MSB 31
  320. #define REO_FLUSH_QUEUE_STATUS_RESERVED_24A_MASK 0x00000000ffffffff
  321. /* Description RESERVED_25A
  322. <legal 0>
  323. */
  324. #define REO_FLUSH_QUEUE_STATUS_RESERVED_25A_OFFSET 0x0000000000000060
  325. #define REO_FLUSH_QUEUE_STATUS_RESERVED_25A_LSB 32
  326. #define REO_FLUSH_QUEUE_STATUS_RESERVED_25A_MSB 59
  327. #define REO_FLUSH_QUEUE_STATUS_RESERVED_25A_MASK 0x0fffffff00000000
  328. /* Description LOOPING_COUNT
  329. A count value that indicates the number of times the producer
  330. of entries into this Ring has looped around the ring.
  331. At initialization time, this value is set to 0. On the first
  332. loop, this value is set to 1. After the max value is reached
  333. allowed by the number of bits for this field, the count
  334. value continues with 0 again.
  335. In case SW is the consumer of the ring entries, it can use
  336. this field to figure out up to where the producer of entries
  337. has created new entries. This eliminates the need to check
  338. where the "head pointer' of the ring is located once the
  339. SW starts processing an interrupt indicating that new entries
  340. have been put into this ring...
  341. Also note that SW if it wants only needs to look at the
  342. LSB bit of this count value.
  343. <legal all>
  344. */
  345. #define REO_FLUSH_QUEUE_STATUS_LOOPING_COUNT_OFFSET 0x0000000000000060
  346. #define REO_FLUSH_QUEUE_STATUS_LOOPING_COUNT_LSB 60
  347. #define REO_FLUSH_QUEUE_STATUS_LOOPING_COUNT_MSB 63
  348. #define REO_FLUSH_QUEUE_STATUS_LOOPING_COUNT_MASK 0xf000000000000000
  349. #endif // REO_FLUSH_QUEUE_STATUS