hal_li_api.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Copyright (c) 2016-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_API_H_
  20. #define _HAL_LI_API_H_
  21. #include "hal_li_hw_headers.h"
  22. #include "hal_api.h"
  23. /**
  24. * hal_set_link_desc_addr_li() - Setup link descriptor in a buffer_addr_info
  25. * HW structure
  26. *
  27. * @desc: Descriptor entry (from WBM_IDLE_LINK ring)
  28. * @cookie: SW cookie for the buffer/descriptor
  29. * @link_desc_paddr: Physical address of link descriptor entry
  30. * @bm_id: idle link BM id
  31. */
  32. void hal_set_link_desc_addr_li(void *desc, uint32_t cookie,
  33. qdf_dma_addr_t link_desc_paddr,
  34. uint8_t bm_id);
  35. /**
  36. * hal_tx_init_data_ring_li() - Initialize all the TCL Descriptors in SRNG
  37. * @hal_soc_hdl: Handle to HAL SoC structure
  38. * @hal_ring_hdl: Handle to HAL SRNG structure
  39. *
  40. * Return: none
  41. */
  42. void hal_tx_init_data_ring_li(hal_soc_handle_t hal_soc_hdl,
  43. hal_ring_handle_t hal_ring_hdl);
  44. /**
  45. * hal_hw_txrx_default_ops_attach_li(): Add default ops for Lithium chips
  46. * @hal_soc: hal_soc handle
  47. *
  48. * Return: None
  49. */
  50. void hal_hw_txrx_default_ops_attach_li(struct hal_soc *hal_soc);
  51. uint32_t hal_rx_wbm_err_src_get_li(hal_ring_desc_t ring_desc);
  52. uint8_t hal_rx_ret_buf_manager_get_li(hal_ring_desc_t ring_desc);
  53. /**
  54. * hal_reo_qdesc_setup_li() - Setup HW REO queue descriptor
  55. * @hal_soc_hdl: Opaque HAL SOC handle
  56. * @tid: TID
  57. * @ba_window_size: BlockAck window size
  58. * @start_seq: Starting sequence number
  59. * @hw_qdesc_vaddr: Virtual address of REO queue descriptor memory
  60. * @hw_qdesc_paddr: Physical address of REO queue descriptor memory
  61. * @pn_type: PN type (one of the types defined in 'enum hal_pn_type')
  62. * @vdev_stats_id: vdev_stats_id
  63. */
  64. void hal_reo_qdesc_setup_li(hal_soc_handle_t hal_soc_hdl,
  65. int tid, uint32_t ba_window_size,
  66. uint32_t start_seq, void *hw_qdesc_vaddr,
  67. qdf_dma_addr_t hw_qdesc_paddr,
  68. int pn_type, uint8_t vdev_stats_id);
  69. #endif /* _HAL_LI_API_H_ */