f0d3d5b972eeba8b0c7222e943fcbb74a6046cb8
[dpdk.git] / drivers / net / txgbe / base / txgbe_hw.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2015-2020
3  */
4
5 #ifndef _TXGBE_HW_H_
6 #define _TXGBE_HW_H_
7
8 #include "txgbe_type.h"
9
10 s32 txgbe_init_hw(struct txgbe_hw *hw);
11 s32 txgbe_start_hw(struct txgbe_hw *hw);
12 s32 txgbe_stop_hw(struct txgbe_hw *hw);
13 s32 txgbe_start_hw_gen2(struct txgbe_hw *hw);
14 s32 txgbe_get_mac_addr(struct txgbe_hw *hw, u8 *mac_addr);
15
16 void txgbe_set_lan_id_multi_port(struct txgbe_hw *hw);
17
18 s32 txgbe_set_rar(struct txgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
19                           u32 enable_addr);
20 s32 txgbe_clear_rar(struct txgbe_hw *hw, u32 index);
21 s32 txgbe_init_rx_addrs(struct txgbe_hw *hw);
22 s32 txgbe_update_mc_addr_list(struct txgbe_hw *hw, u8 *mc_addr_list,
23                                       u32 mc_addr_count,
24                                       txgbe_mc_addr_itr func, bool clear);
25
26 s32 txgbe_validate_mac_addr(u8 *mac_addr);
27
28 s32 txgbe_get_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr);
29 s32 txgbe_set_san_mac_addr(struct txgbe_hw *hw, u8 *san_mac_addr);
30
31 s32 txgbe_init_uta_tables(struct txgbe_hw *hw);
32 s32 txgbe_check_mac_link(struct txgbe_hw *hw,
33                                u32 *speed,
34                                bool *link_up, bool link_up_wait_to_complete);
35
36 s32 txgbe_get_device_caps(struct txgbe_hw *hw, u16 *device_caps);
37 void txgbe_clear_tx_pending(struct txgbe_hw *hw);
38
39 s32 txgbe_reset_pipeline_raptor(struct txgbe_hw *hw);
40
41 void txgbe_disable_rx(struct txgbe_hw *hw);
42 void txgbe_enable_rx(struct txgbe_hw *hw);
43 s32 txgbe_setup_mac_link_multispeed_fiber(struct txgbe_hw *hw,
44                                           u32 speed,
45                                           bool autoneg_wait_to_complete);
46 void txgbe_set_mta(struct txgbe_hw *hw, u8 *mc_addr);
47 s32 txgbe_init_shared_code(struct txgbe_hw *hw);
48 s32 txgbe_set_mac_type(struct txgbe_hw *hw);
49 s32 txgbe_init_ops_pf(struct txgbe_hw *hw);
50 s32 txgbe_get_link_capabilities_raptor(struct txgbe_hw *hw,
51                                       u32 *speed, bool *autoneg);
52 u32 txgbe_get_media_type_raptor(struct txgbe_hw *hw);
53 void txgbe_disable_tx_laser_multispeed_fiber(struct txgbe_hw *hw);
54 void txgbe_enable_tx_laser_multispeed_fiber(struct txgbe_hw *hw);
55 void txgbe_flap_tx_laser_multispeed_fiber(struct txgbe_hw *hw);
56 void txgbe_set_hard_rate_select_speed(struct txgbe_hw *hw,
57                                         u32 speed);
58 s32 txgbe_setup_mac_link_smartspeed(struct txgbe_hw *hw,
59                                     u32 speed,
60                                     bool autoneg_wait_to_complete);
61 s32 txgbe_start_mac_link_raptor(struct txgbe_hw *hw,
62                                bool autoneg_wait_to_complete);
63 s32 txgbe_setup_mac_link(struct txgbe_hw *hw, u32 speed,
64                                bool autoneg_wait_to_complete);
65 s32 txgbe_setup_sfp_modules(struct txgbe_hw *hw);
66 void txgbe_init_mac_link_ops(struct txgbe_hw *hw);
67 s32 txgbe_reset_hw(struct txgbe_hw *hw);
68 s32 txgbe_start_hw_raptor(struct txgbe_hw *hw);
69 s32 txgbe_init_phy_raptor(struct txgbe_hw *hw);
70 bool txgbe_verify_lesm_fw_enabled_raptor(struct txgbe_hw *hw);
71 #endif /* _TXGBE_HW_H_ */