reo_flush_queue_status.h 21 KB

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