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