hal_li_reo.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * Copyright (c) 2017-2019, 2021 The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  4. *
  5. * Permission to use, copy, modify, and/or distribute this software for
  6. * any purpose with or without fee is hereby granted, provided that the
  7. * above copyright notice and this permission notice appear in all
  8. * copies.
  9. *
  10. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  11. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  12. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  13. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  14. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  15. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  16. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  17. * PERFORMANCE OF THIS SOFTWARE.
  18. */
  19. #ifndef _HAL_LI_REO_H_
  20. #define _HAL_LI_REO_H_
  21. #include "hal_rx.h"
  22. #include "hal_reo.h"
  23. #define HAL_REO_QUEUE_EXT_DESC 9
  24. /**
  25. * hal_get_ba_aging_timeout_li() - Get BA Aging timeout
  26. * @hal_soc_hdl: Opaque HAL SOC handle
  27. * @ac: Access category
  28. * @value: window size to get
  29. */
  30. void hal_get_ba_aging_timeout_li(hal_soc_handle_t hal_soc_hdl, uint8_t ac,
  31. uint32_t *value);
  32. /**
  33. * hal_set_ba_aging_timeout_li() - Set BA Aging timeout
  34. * @hal_soc_hdl: Opaque HAL SOC handle
  35. * @ac: Access category
  36. * ac: 0 - Background, 1 - Best Effort, 2 - Video, 3 - Voice
  37. * @value: Input value to set
  38. */
  39. void hal_set_ba_aging_timeout_li(hal_soc_handle_t hal_soc_hdl, uint8_t ac,
  40. uint32_t value);
  41. uint32_t hal_get_reo_reg_base_offset_li(void);
  42. int hal_reo_send_cmd_li(hal_soc_handle_t hal_soc_hdl,
  43. hal_ring_handle_t hal_ring_hdl,
  44. enum hal_reo_cmd_type cmd,
  45. void *params);
  46. /* REO status ring routines */
  47. void
  48. hal_reo_queue_stats_status_li(hal_ring_desc_t ring_desc,
  49. void *st_handle,
  50. hal_soc_handle_t hal_soc_hdl);
  51. void
  52. hal_reo_flush_queue_status_li(hal_ring_desc_t ring_desc,
  53. void *st_handle,
  54. hal_soc_handle_t hal_soc_hdl);
  55. void
  56. hal_reo_flush_cache_status_li(hal_ring_desc_t ring_desc,
  57. void *st_handle,
  58. hal_soc_handle_t hal_soc_hdl);
  59. void
  60. hal_reo_unblock_cache_status_li(hal_ring_desc_t ring_desc,
  61. hal_soc_handle_t hal_soc_hdl,
  62. void *st_handle);
  63. void hal_reo_flush_timeout_list_status_li(hal_ring_desc_t ring_desc,
  64. void *st_handle,
  65. hal_soc_handle_t hal_soc_hdl);
  66. void hal_reo_desc_thres_reached_status_li(hal_ring_desc_t ring_desc,
  67. void *st_handle,
  68. hal_soc_handle_t hal_soc_hdl);
  69. void
  70. hal_reo_rx_update_queue_status_li(hal_ring_desc_t ring_desc,
  71. void *st_handle,
  72. hal_soc_handle_t hal_soc_hdl);
  73. /**
  74. * hal_reo_init_cmd_ring_li() - Initialize descriptors of REO command SRNG
  75. * with command number
  76. * @hal_soc_hdl: Handle to HAL SoC structure
  77. * @hal_ring_hdl: Handle to HAL SRNG structure
  78. *
  79. * Return: none
  80. */
  81. void hal_reo_init_cmd_ring_li(hal_soc_handle_t hal_soc_hdl,
  82. hal_ring_handle_t hal_ring_hdl);
  83. uint8_t hal_get_tlv_hdr_size_li(void);
  84. uint64_t hal_rx_get_qdesc_addr_li(uint8_t *dst_ring_desc, uint8_t *buf);
  85. #endif /* _HAL_LI_REO_H_ */