xref: /linux/drivers/net/ethernet/wangxun/libwx/wx_hw.h (revision dd093fb0)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2015 - 2022 Beijing WangXun Technology Co., Ltd. */
3 
4 #ifndef _WX_HW_H_
5 #define _WX_HW_H_
6 
7 int wx_check_flash_load(struct wx_hw *hw, u32 check_bit);
8 void wx_control_hw(struct wx_hw *wxhw, bool drv);
9 int wx_mng_present(struct wx_hw *wxhw);
10 int wx_host_interface_command(struct wx_hw *wxhw, u32 *buffer,
11 			      u32 length, u32 timeout, bool return_data);
12 int wx_read_ee_hostif(struct wx_hw *wxhw, u16 offset, u16 *data);
13 int wx_read_ee_hostif_buffer(struct wx_hw *wxhw,
14 			     u16 offset, u16 words, u16 *data);
15 int wx_reset_hostif(struct wx_hw *wxhw);
16 void wx_init_eeprom_params(struct wx_hw *wxhw);
17 void wx_get_mac_addr(struct wx_hw *wxhw, u8 *mac_addr);
18 int wx_set_rar(struct wx_hw *wxhw, u32 index, u8 *addr, u64 pools, u32 enable_addr);
19 int wx_clear_rar(struct wx_hw *wxhw, u32 index);
20 void wx_init_rx_addrs(struct wx_hw *wxhw);
21 void wx_disable_rx(struct wx_hw *wxhw);
22 int wx_disable_pcie_master(struct wx_hw *wxhw);
23 int wx_stop_adapter(struct wx_hw *wxhw);
24 void wx_reset_misc(struct wx_hw *wxhw);
25 int wx_get_pcie_msix_counts(struct wx_hw *wxhw, u16 *msix_count, u16 max_msix_count);
26 int wx_sw_init(struct wx_hw *wxhw);
27 
28 #endif /* _WX_HW_H_ */
29