hal_reo.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. /*
  2. * Copyright (c) 2017-2018 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. #ifndef _HAL_REO_H_
  19. #define _HAL_REO_H_
  20. #include <qdf_types.h>
  21. /* HW headers */
  22. #include <reo_descriptor_threshold_reached_status.h>
  23. #include <reo_flush_queue.h>
  24. #include <reo_flush_timeout_list_status.h>
  25. #include <reo_unblock_cache.h>
  26. #include <reo_flush_cache.h>
  27. #include <reo_flush_queue_status.h>
  28. #include <reo_get_queue_stats.h>
  29. #include <reo_unblock_cache_status.h>
  30. #include <reo_flush_cache_status.h>
  31. #include <reo_flush_timeout_list.h>
  32. #include <reo_get_queue_stats_status.h>
  33. #include <reo_update_rx_reo_queue.h>
  34. #include <reo_update_rx_reo_queue_status.h>
  35. #include <tlv_tag_def.h>
  36. /* SW headers */
  37. #include "hal_api.h"
  38. /*---------------------------------------------------------------------------
  39. Preprocessor definitions and constants
  40. ---------------------------------------------------------------------------*/
  41. /* TLV values */
  42. #define HAL_REO_GET_QUEUE_STATS_TLV WIFIREO_GET_QUEUE_STATS_E
  43. #define HAL_REO_FLUSH_QUEUE_TLV WIFIREO_FLUSH_QUEUE_E
  44. #define HAL_REO_FLUSH_CACHE_TLV WIFIREO_FLUSH_CACHE_E
  45. #define HAL_REO_UNBLOCK_CACHE_TLV WIFIREO_UNBLOCK_CACHE_E
  46. #define HAL_REO_FLUSH_TIMEOUT_LIST_TLV WIFIREO_FLUSH_TIMEOUT_LIST_E
  47. #define HAL_REO_RX_UPDATE_QUEUE_TLV WIFIREO_UPDATE_RX_REO_QUEUE_E
  48. #define HAL_REO_QUEUE_STATS_STATUS_TLV WIFIREO_GET_QUEUE_STATS_STATUS_E
  49. #define HAL_REO_FLUSH_QUEUE_STATUS_TLV WIFIREO_FLUSH_QUEUE_STATUS_E
  50. #define HAL_REO_FLUSH_CACHE_STATUS_TLV WIFIREO_FLUSH_CACHE_STATUS_E
  51. #define HAL_REO_UNBLK_CACHE_STATUS_TLV WIFIREO_UNBLOCK_CACHE_STATUS_E
  52. #define HAL_REO_TIMOUT_LIST_STATUS_TLV WIFIREO_FLUSH_TIMEOUT_LIST_STATUS_E
  53. #define HAL_REO_DESC_THRES_STATUS_TLV \
  54. WIFIREO_DESCRIPTOR_THRESHOLD_REACHED_STATUS_E
  55. #define HAL_REO_UPDATE_RX_QUEUE_STATUS_TLV WIFIREO_UPDATE_RX_REO_QUEUE_STATUS_E
  56. #define HAL_SET_FIELD(block, field, value) \
  57. ((value << (block ## _ ## field ## _LSB)) & \
  58. (block ## _ ## field ## _MASK))
  59. #define HAL_GET_FIELD(block, field, value) \
  60. ((value & (block ## _ ## field ## _MASK)) >> \
  61. (block ## _ ## field ## _LSB))
  62. #define HAL_SET_TLV_HDR(desc, tag, len) \
  63. do { \
  64. ((struct tlv_32_hdr *) desc)->tlv_tag = tag; \
  65. ((struct tlv_32_hdr *) desc)->tlv_len = len; \
  66. } while (0)
  67. #define HAL_GET_TLV(desc) (((struct tlv_32_hdr *) desc)->tlv_tag)
  68. #define HAL_OFFSET_DW(_block, _field) (HAL_OFFSET(_block, _field) >> 2)
  69. /* dword offsets in REO cmd TLV */
  70. #define CMD_HEADER_DW_OFFSET 0
  71. #define HAL_REO_STATUS_GET_HEADER(d, b, h) do { \
  72. uint32_t val1 = d[HAL_OFFSET_DW(b ##_STATUS_0, \
  73. UNIFORM_REO_STATUS_HEADER_STATUS_HEADER)]; \
  74. h.cmd_num = \
  75. HAL_GET_FIELD( \
  76. UNIFORM_REO_STATUS_HEADER_0, REO_STATUS_NUMBER, \
  77. val1); \
  78. h.exec_time = \
  79. HAL_GET_FIELD(UNIFORM_REO_STATUS_HEADER_0, \
  80. CMD_EXECUTION_TIME, val1); \
  81. h.status = \
  82. HAL_GET_FIELD(UNIFORM_REO_STATUS_HEADER_0, \
  83. REO_CMD_EXECUTION_STATUS, val1); \
  84. val1 = d[HAL_OFFSET_DW(b ##_STATUS_1, \
  85. UNIFORM_REO_STATUS_HEADER_STATUS_HEADER)]; \
  86. h.tstamp = \
  87. HAL_GET_FIELD(UNIFORM_REO_STATUS_HEADER_1, TIMESTAMP, val1); \
  88. } while (0)
  89. /**
  90. * enum reo_unblock_cache_type: Enum for unblock type in REO unblock command
  91. * @UNBLOCK_RES_INDEX: Unblock a block resource
  92. * @UNBLOCK_CACHE: Unblock cache
  93. */
  94. enum reo_unblock_cache_type {
  95. UNBLOCK_RES_INDEX = 0,
  96. UNBLOCK_CACHE = 1
  97. };
  98. /**
  99. * enum reo_thres_index_reg: Enum for reo descriptor usage counter for
  100. * which threshold status is being indicated.
  101. * @reo_desc_counter0_threshold: counter0 reached threshold
  102. * @reo_desc_counter1_threshold: counter1 reached threshold
  103. * @reo_desc_counter2_threshold: counter2 reached threshold
  104. * @reo_desc_counter_sum_threshold: Total count reached threshold
  105. */
  106. enum reo_thres_index_reg {
  107. reo_desc_counter0_threshold = 0,
  108. reo_desc_counter1_threshold = 1,
  109. reo_desc_counter2_threshold = 2,
  110. reo_desc_counter_sum_threshold = 3
  111. };
  112. /**
  113. * enum reo_cmd_exec_status: Enum for execution status of REO command
  114. *
  115. * @HAL_REO_CMD_SUCCESS: Command has successfully be executed
  116. * @HAL_REO_CMD_BLOCKED: Command could not be executed as the queue or cache
  117. * was blocked
  118. * @HAL_REO_CMD_FAILED: Command has encountered problems when executing, like
  119. * the queue descriptor not being valid
  120. */
  121. enum reo_cmd_exec_status {
  122. HAL_REO_CMD_SUCCESS = 0,
  123. HAL_REO_CMD_BLOCKED = 1,
  124. HAL_REO_CMD_FAILED = 2,
  125. HAL_REO_CMD_RESOURCE_BLOCKED = 3,
  126. HAL_REO_CMD_DRAIN = 0xff
  127. };
  128. /**
  129. * enum hal_reo_cmd_type: Enum for REO command type
  130. * @CMD_GET_QUEUE_STATS: Get REO queue status/stats
  131. * @CMD_FLUSH_QUEUE: Flush all frames in REO queue
  132. * @CMD_FLUSH_CACHE: Flush descriptor entries in the cache
  133. * @CMD_UNBLOCK_CACHE: Unblock a descriptor’s address that was blocked
  134. * earlier with a ‘REO_FLUSH_CACHE’ command
  135. * @CMD_FLUSH_TIMEOUT_LIST: Flush buffers/descriptors from timeout list
  136. * @CMD_UPDATE_RX_REO_QUEUE: Update REO queue settings
  137. */
  138. enum hal_reo_cmd_type {
  139. CMD_GET_QUEUE_STATS = 0,
  140. CMD_FLUSH_QUEUE = 1,
  141. CMD_FLUSH_CACHE = 2,
  142. CMD_UNBLOCK_CACHE = 3,
  143. CMD_FLUSH_TIMEOUT_LIST = 4,
  144. CMD_UPDATE_RX_REO_QUEUE = 5
  145. };
  146. /**
  147. * struct hal_reo_cmd_params_std: Standard REO command parameters
  148. * @need_status: Status required for the command
  149. * @addr_lo: Lower 32 bits of REO queue descriptor address
  150. * @addr_hi: Upper 8 bits of REO queue descriptor address
  151. */
  152. struct hal_reo_cmd_params_std {
  153. bool need_status;
  154. uint32_t addr_lo;
  155. uint8_t addr_hi;
  156. };
  157. /**
  158. * struct hal_reo_cmd_get_queue_stats_params: Parameters to
  159. * CMD_GET_QUEUE_STATScommand
  160. * @clear: Clear stats after retreiving
  161. */
  162. struct hal_reo_cmd_get_queue_stats_params {
  163. bool clear;
  164. };
  165. /**
  166. * struct hal_reo_cmd_flush_queue_params: Parameters to CMD_FLUSH_QUEUE
  167. * @use_after_flush: Block usage after flush till unblock command
  168. * @index: Blocking resource to be used
  169. */
  170. struct hal_reo_cmd_flush_queue_params {
  171. bool block_use_after_flush;
  172. uint8_t index;
  173. };
  174. /**
  175. * struct hal_reo_cmd_flush_cache_params: Parameters to CMD_FLUSH_CACHE
  176. * @fwd_mpdus_in_queue: Forward MPDUs before flushing descriptor
  177. * @rel_block_index: Release blocking resource used earlier
  178. * @cache_block_res_index: Blocking resource to be used
  179. * @flush_no_inval: Flush without invalidatig descriptor
  180. * @use_after_flush: Block usage after flush till unblock command
  181. * @flush_all: Flush entire REO cache
  182. */
  183. struct hal_reo_cmd_flush_cache_params {
  184. bool fwd_mpdus_in_queue;
  185. bool rel_block_index;
  186. uint8_t cache_block_res_index;
  187. bool flush_no_inval;
  188. bool block_use_after_flush;
  189. bool flush_all;
  190. };
  191. /**
  192. * struct hal_reo_cmd_unblock_cache_params: Parameters to CMD_UNBLOCK_CACHE
  193. * @type: Unblock type (enum reo_unblock_cache_type)
  194. * @index: Blocking index to be released
  195. */
  196. struct hal_reo_cmd_unblock_cache_params {
  197. enum reo_unblock_cache_type type;
  198. uint8_t index;
  199. };
  200. /**
  201. * struct hal_reo_cmd_flush_timeout_list_params: Parameters to
  202. * CMD_FLUSH_TIMEOUT_LIST
  203. * @ac_list: AC timeout list to be flushed
  204. * @min_rel_desc: Min. number of link descriptors to be release
  205. * @min_fwd_buf: Min. number of buffers to be forwarded
  206. */
  207. struct hal_reo_cmd_flush_timeout_list_params {
  208. uint8_t ac_list;
  209. uint16_t min_rel_desc;
  210. uint16_t min_fwd_buf;
  211. };
  212. /**
  213. * struct hal_reo_cmd_update_queue_params: Parameters to CMD_UPDATE_RX_REO_QUEUE
  214. * @update_rx_queue_num: Update receive queue number
  215. * @update_vld: Update valid bit
  216. * @update_assoc_link_desc: Update associated link descriptor
  217. * @update_disable_dup_detect: Update duplicate detection
  218. * @update_soft_reorder_enab: Update soft reorder enable
  219. * @update_ac: Update access category
  220. * @update_bar: Update BAR received bit
  221. * @update_rty: Update retry bit
  222. * @update_chk_2k_mode: Update chk_2k_mode setting
  223. * @update_oor_mode: Update OOR mode settting
  224. * @update_ba_window_size: Update BA window size
  225. * @update_pn_check_needed: Update pn_check_needed
  226. * @update_pn_even: Update pn_even
  227. * @update_pn_uneven: Update pn_uneven
  228. * @update_pn_hand_enab: Update pn_handling_enable
  229. * @update_pn_size: Update pn_size
  230. * @update_ignore_ampdu: Update ignore_ampdu
  231. * @update_svld: update svld
  232. * @update_ssn: Update SSN
  233. * @update_seq_2k_err_detect: Update seq_2k_err_detected flag
  234. * @update_pn_err_detect: Update pn_err_detected flag
  235. * @update_pn_valid: Update pn_valid
  236. * @update_pn: Update PN
  237. * @rx_queue_num: rx_queue_num to be updated
  238. * @vld: valid bit to be updated
  239. * @assoc_link_desc: assoc_link_desc counter
  240. * @disable_dup_detect: disable_dup_detect to be updated
  241. * @soft_reorder_enab: soft_reorder_enab to be updated
  242. * @ac: AC to be updated
  243. * @bar: BAR flag to be updated
  244. * @rty: RTY flag to be updated
  245. * @chk_2k_mode: check_2k_mode setting to be updated
  246. * @oor_mode: oor_mode to be updated
  247. * @pn_check_needed: pn_check_needed to be updated
  248. * @pn_even: pn_even to be updated
  249. * @pn_uneven: pn_uneven to be updated
  250. * @pn_hand_enab: pn_handling_enable to be updated
  251. * @ignore_ampdu: ignore_ampdu to be updated
  252. * @ba_window_size: BA window size to be updated
  253. * @pn_size: pn_size to be updated
  254. * @svld: svld flag to be updated
  255. * @ssn: SSN to be updated
  256. * @seq_2k_err_detect: seq_2k_err_detected flag to be updated
  257. * @pn_err_detect: pn_err_detected flag to be updated
  258. * @pn_31_0: PN bits 31-0
  259. * @pn_63_32: PN bits 63-32
  260. * @pn_95_64: PN bits 95-64
  261. * @pn_127_96: PN bits 127-96
  262. */
  263. struct hal_reo_cmd_update_queue_params {
  264. uint32_t update_rx_queue_num:1,
  265. update_vld:1,
  266. update_assoc_link_desc:1,
  267. update_disable_dup_detect:1,
  268. update_soft_reorder_enab:1,
  269. update_ac:1,
  270. update_bar:1,
  271. update_rty:1,
  272. update_chk_2k_mode:1,
  273. update_oor_mode:1,
  274. update_ba_window_size:1,
  275. update_pn_check_needed:1,
  276. update_pn_even:1,
  277. update_pn_uneven:1,
  278. update_pn_hand_enab:1,
  279. update_pn_size:1,
  280. update_ignore_ampdu:1,
  281. update_svld:1,
  282. update_ssn:1,
  283. update_seq_2k_err_detect:1,
  284. update_pn_err_detect:1,
  285. update_pn_valid:1,
  286. update_pn:1;
  287. uint32_t rx_queue_num:16,
  288. vld:1,
  289. assoc_link_desc:2,
  290. disable_dup_detect:1,
  291. soft_reorder_enab:1,
  292. ac:2,
  293. bar:1,
  294. rty:1,
  295. chk_2k_mode:1,
  296. oor_mode:1,
  297. pn_check_needed:1,
  298. pn_even:1,
  299. pn_uneven:1,
  300. pn_hand_enab:1,
  301. ignore_ampdu:1;
  302. uint32_t ba_window_size:8,
  303. pn_size:8,
  304. svld:1,
  305. ssn:12,
  306. seq_2k_err_detect:1,
  307. pn_err_detect:1;
  308. uint32_t pn_31_0:32;
  309. uint32_t pn_63_32:32;
  310. uint32_t pn_95_64:32;
  311. uint32_t pn_127_96:32;
  312. };
  313. /**
  314. * struct hal_reo_cmd_params: Common structure to pass REO command parameters
  315. * @hal_reo_cmd_params_std: Standard parameters
  316. * @u: Union of various REO command parameters
  317. */
  318. struct hal_reo_cmd_params {
  319. struct hal_reo_cmd_params_std std;
  320. union {
  321. struct hal_reo_cmd_get_queue_stats_params stats_params;
  322. struct hal_reo_cmd_flush_queue_params fl_queue_params;
  323. struct hal_reo_cmd_flush_cache_params fl_cache_params;
  324. struct hal_reo_cmd_unblock_cache_params unblk_cache_params;
  325. struct hal_reo_cmd_flush_timeout_list_params fl_tim_list_params;
  326. struct hal_reo_cmd_update_queue_params upd_queue_params;
  327. } u;
  328. };
  329. /**
  330. * struct hal_reo_status_header: Common REO status header
  331. * @cmd_num: Command number
  332. * @exec_time: execution time
  333. * @status: command execution status
  334. * @tstamp: Timestamp of status updated
  335. */
  336. struct hal_reo_status_header {
  337. uint16_t cmd_num;
  338. uint16_t exec_time;
  339. enum reo_cmd_exec_status status;
  340. uint32_t tstamp;
  341. };
  342. /**
  343. * struct hal_reo_queue_status: REO queue status structure
  344. * @header: Common REO status header
  345. * @ssn: SSN of current BA window
  346. * @curr_idx: last forwarded pkt
  347. * @pn_31_0, pn_63_32, pn_95_64, pn_127_96:
  348. * PN number bits extracted from IV field
  349. * @last_rx_enq_tstamp: Last enqueue timestamp
  350. * @last_rx_deq_tstamp: Last dequeue timestamp
  351. * @rx_bitmap_31_0, rx_bitmap_63_32, rx_bitmap_95_64
  352. * @rx_bitmap_127_96, rx_bitmap_159_128, rx_bitmap_191_160
  353. * @rx_bitmap_223_192, rx_bitmap_255_224: Each bit corresonds to a frame
  354. * held in re-order queue
  355. * @curr_mpdu_cnt, curr_msdu_cnt: Number of MPDUs and MSDUs in the queue
  356. * @fwd_timeout_cnt: Frames forwarded due to timeout
  357. * @fwd_bar_cnt: Frames forwarded BAR frame
  358. * @dup_cnt: duplicate frames detected
  359. * @frms_in_order_cnt: Frames received in order
  360. * @bar_rcvd_cnt: BAR frame count
  361. * @mpdu_frms_cnt, msdu_frms_cnt, total_cnt: MPDU, MSDU, total frames
  362. processed by REO
  363. * @late_recv_mpdu_cnt; received after window had moved on
  364. * @win_jump_2k: 2K jump count
  365. * @hole_cnt: sequence hole count
  366. */
  367. struct hal_reo_queue_status {
  368. struct hal_reo_status_header header;
  369. uint16_t ssn;
  370. uint8_t curr_idx;
  371. uint32_t pn_31_0, pn_63_32, pn_95_64, pn_127_96;
  372. uint32_t last_rx_enq_tstamp, last_rx_deq_tstamp;
  373. uint32_t rx_bitmap_31_0, rx_bitmap_63_32, rx_bitmap_95_64;
  374. uint32_t rx_bitmap_127_96, rx_bitmap_159_128, rx_bitmap_191_160;
  375. uint32_t rx_bitmap_223_192, rx_bitmap_255_224;
  376. uint8_t curr_mpdu_cnt, curr_msdu_cnt;
  377. uint8_t fwd_timeout_cnt, fwd_bar_cnt;
  378. uint16_t dup_cnt;
  379. uint32_t frms_in_order_cnt;
  380. uint8_t bar_rcvd_cnt;
  381. uint32_t mpdu_frms_cnt, msdu_frms_cnt, total_cnt;
  382. uint16_t late_recv_mpdu_cnt;
  383. uint8_t win_jump_2k;
  384. uint16_t hole_cnt;
  385. };
  386. /**
  387. * struct hal_reo_flush_queue_status: FLUSH_QUEUE status structure
  388. * @header: Common REO status header
  389. * @error: Error detected
  390. */
  391. struct hal_reo_flush_queue_status {
  392. struct hal_reo_status_header header;
  393. bool error;
  394. };
  395. /**
  396. * struct hal_reo_flush_cache_status: FLUSH_CACHE status structure
  397. * @header: Common REO status header
  398. * @error: Error detected
  399. * @block_error: Blocking related error
  400. * @cache_flush_status: Cache hit/miss
  401. * @cache_flush_status_desc_type: type of descriptor flushed
  402. * @cache_flush_cnt: number of lines actually flushed
  403. */
  404. struct hal_reo_flush_cache_status {
  405. struct hal_reo_status_header header;
  406. bool error;
  407. uint8_t block_error;
  408. bool cache_flush_status;
  409. uint8_t cache_flush_status_desc_type;
  410. uint8_t cache_flush_cnt;
  411. };
  412. /**
  413. * struct hal_reo_unblk_cache_status: UNBLOCK_CACHE status structure
  414. * @header: Common REO status header
  415. * @error: error detected
  416. * unblock_type: resoure or cache
  417. */
  418. struct hal_reo_unblk_cache_status {
  419. struct hal_reo_status_header header;
  420. bool error;
  421. enum reo_unblock_cache_type unblock_type;
  422. };
  423. /**
  424. * struct hal_reo_flush_timeout_list_status: FLUSH_TIMEOUT_LIST status structure
  425. * @header: Common REO status header
  426. * @error: error detected
  427. * @list_empty: timeout list empty
  428. * @rel_desc_cnt: number of link descriptors released
  429. * @fwd_buf_cnt: number of buffers forwarded to REO destination ring
  430. */
  431. struct hal_reo_flush_timeout_list_status {
  432. struct hal_reo_status_header header;
  433. bool error;
  434. bool list_empty;
  435. uint16_t rel_desc_cnt;
  436. uint16_t fwd_buf_cnt;
  437. };
  438. /**
  439. * struct hal_reo_desc_thres_reached_status: desc_thres_reached status structure
  440. * @header: Common REO status header
  441. * @thres_index: Index of descriptor threshold counter
  442. * @link_desc_counter0, link_desc_counter1, link_desc_counter2: descriptor
  443. * counter values
  444. * @link_desc_counter_sum: overall descriptor count
  445. */
  446. struct hal_reo_desc_thres_reached_status {
  447. struct hal_reo_status_header header;
  448. enum reo_thres_index_reg thres_index;
  449. uint32_t link_desc_counter0, link_desc_counter1, link_desc_counter2;
  450. uint32_t link_desc_counter_sum;
  451. };
  452. /**
  453. * struct hal_reo_update_rx_queue_status: UPDATE_RX_QUEUE status structure
  454. * @header: Common REO status header
  455. */
  456. struct hal_reo_update_rx_queue_status {
  457. struct hal_reo_status_header header;
  458. };
  459. /**
  460. * union hal_reo_status: Union to pass REO status to callbacks
  461. * @queue_status: Refer to struct hal_reo_queue_status
  462. * @fl_cache_status: Refer to struct hal_reo_flush_cache_status
  463. * @fl_queue_status: Refer to struct hal_reo_flush_queue_status
  464. * @fl_timeout_status: Refer to struct hal_reo_flush_timeout_list_status
  465. * @unblk_cache_status: Refer to struct hal_reo_unblk_cache_status
  466. * @thres_status: struct hal_reo_desc_thres_reached_status
  467. * @rx_queue_status: struct hal_reo_update_rx_queue_status
  468. */
  469. union hal_reo_status {
  470. struct hal_reo_queue_status queue_status;
  471. struct hal_reo_flush_cache_status fl_cache_status;
  472. struct hal_reo_flush_queue_status fl_queue_status;
  473. struct hal_reo_flush_timeout_list_status fl_timeout_status;
  474. struct hal_reo_unblk_cache_status unblk_cache_status;
  475. struct hal_reo_desc_thres_reached_status thres_status;
  476. struct hal_reo_update_rx_queue_status rx_queue_status;
  477. };
  478. /* Prototypes */
  479. /* REO command ring routines */
  480. int hal_reo_cmd_queue_stats(void *reo_ring, struct hal_soc *soc,
  481. struct hal_reo_cmd_params *cmd);
  482. int hal_reo_cmd_flush_queue(void *reo_ring, struct hal_soc *soc,
  483. struct hal_reo_cmd_params *cmd);
  484. int hal_reo_cmd_flush_cache(void *reo_ring, struct hal_soc *soc,
  485. struct hal_reo_cmd_params *cmd);
  486. int hal_reo_cmd_unblock_cache(void *reo_ring, struct hal_soc *soc,
  487. struct hal_reo_cmd_params *cmd);
  488. int hal_reo_cmd_flush_timeout_list(void *reo_ring, struct hal_soc *soc,
  489. struct hal_reo_cmd_params *cmd);
  490. int hal_reo_cmd_update_rx_queue(void *reo_ring, struct hal_soc *soc,
  491. struct hal_reo_cmd_params *cmd);
  492. /* REO status ring routines */
  493. void hal_reo_queue_stats_status(uint32_t *reo_desc,
  494. struct hal_reo_queue_status *st);
  495. void hal_reo_flush_queue_status(uint32_t *reo_desc,
  496. struct hal_reo_flush_queue_status *st);
  497. void hal_reo_flush_cache_status(uint32_t *reo_desc, struct hal_soc *soc,
  498. struct hal_reo_flush_cache_status *st);
  499. void hal_reo_unblock_cache_status(uint32_t *reo_desc, struct hal_soc *soc,
  500. struct hal_reo_unblk_cache_status *st);
  501. void hal_reo_flush_timeout_list_status(
  502. uint32_t *reo_desc,
  503. struct hal_reo_flush_timeout_list_status *st);
  504. void hal_reo_desc_thres_reached_status(
  505. uint32_t *reo_desc,
  506. struct hal_reo_desc_thres_reached_status *st);
  507. void hal_reo_rx_update_queue_status(uint32_t *reo_desc,
  508. struct hal_reo_update_rx_queue_status *st);
  509. void hal_reo_init_cmd_ring(struct hal_soc *soc, void *hal_srng);
  510. #endif /* _HAL_REO_H */