875bfa1add48abd3a9a6c11fb942148f11334ce7
[dpdk.git] / drivers / net / ngbe / base / ngbe_hw.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
3  * Copyright(c) 2010-2017 Intel Corporation
4  */
5
6 #ifndef _NGBE_HW_H_
7 #define _NGBE_HW_H_
8
9 #include "ngbe_type.h"
10
11 #define NGBE_EM_MAX_TX_QUEUES 8
12 #define NGBE_EM_MAX_RX_QUEUES 8
13 #define NGBE_EM_RAR_ENTRIES   32
14 #define NGBE_EM_MC_TBL_SIZE   32
15
16 s32 ngbe_init_hw(struct ngbe_hw *hw);
17 s32 ngbe_reset_hw_em(struct ngbe_hw *hw);
18 s32 ngbe_stop_hw(struct ngbe_hw *hw);
19 s32 ngbe_get_mac_addr(struct ngbe_hw *hw, u8 *mac_addr);
20
21 void ngbe_set_lan_id_multi_port(struct ngbe_hw *hw);
22
23 s32 ngbe_set_rar(struct ngbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
24                           u32 enable_addr);
25 s32 ngbe_clear_rar(struct ngbe_hw *hw, u32 index);
26 s32 ngbe_init_rx_addrs(struct ngbe_hw *hw);
27
28 s32 ngbe_validate_mac_addr(u8 *mac_addr);
29 s32 ngbe_acquire_swfw_sync(struct ngbe_hw *hw, u32 mask);
30 void ngbe_release_swfw_sync(struct ngbe_hw *hw, u32 mask);
31
32 s32 ngbe_set_vmdq(struct ngbe_hw *hw, u32 rar, u32 vmdq);
33 s32 ngbe_clear_vmdq(struct ngbe_hw *hw, u32 rar, u32 vmdq);
34 s32 ngbe_init_uta_tables(struct ngbe_hw *hw);
35
36 s32 ngbe_init_thermal_sensor_thresh(struct ngbe_hw *hw);
37 s32 ngbe_mac_check_overtemp(struct ngbe_hw *hw);
38 void ngbe_disable_rx(struct ngbe_hw *hw);
39 s32 ngbe_init_shared_code(struct ngbe_hw *hw);
40 s32 ngbe_set_mac_type(struct ngbe_hw *hw);
41 s32 ngbe_init_ops_pf(struct ngbe_hw *hw);
42 s32 ngbe_init_phy(struct ngbe_hw *hw);
43 void ngbe_map_device_id(struct ngbe_hw *hw);
44
45 #endif /* _NGBE_HW_H_ */