hal_reo.h 18 KB

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