hal_li_api.h 2.5 KB

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