1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
5 #ifndef _NGBE_TYPE_DUMMY_H_
6 #define _NGBE_TYPE_DUMMY_H_
9 #elif defined(__GNUC__)
10 #define TUP(x) x##_unused ngbe_unused
11 #elif defined(__LCLINT__)
12 #define TUP(x) x /*@unused@*/
27 /* struct ngbe_bus_operations */
28 static inline void ngbe_bus_set_lan_id_dummy(struct ngbe_hw *TUP0)
31 /* struct ngbe_rom_operations */
32 static inline s32 ngbe_rom_init_params_dummy(struct ngbe_hw *TUP0)
34 return NGBE_ERR_OPS_DUMMY;
36 static inline s32 ngbe_rom_validate_checksum_dummy(struct ngbe_hw *TUP0,
39 return NGBE_ERR_OPS_DUMMY;
41 /* struct ngbe_mac_operations */
42 static inline s32 ngbe_mac_init_hw_dummy(struct ngbe_hw *TUP0)
44 return NGBE_ERR_OPS_DUMMY;
46 static inline s32 ngbe_mac_reset_hw_dummy(struct ngbe_hw *TUP0)
48 return NGBE_ERR_OPS_DUMMY;
50 static inline s32 ngbe_mac_start_hw_dummy(struct ngbe_hw *TUP0)
52 return NGBE_ERR_OPS_DUMMY;
54 static inline s32 ngbe_mac_stop_hw_dummy(struct ngbe_hw *TUP0)
56 return NGBE_ERR_OPS_DUMMY;
58 static inline s32 ngbe_mac_get_mac_addr_dummy(struct ngbe_hw *TUP0, u8 *TUP1)
60 return NGBE_ERR_OPS_DUMMY;
62 static inline s32 ngbe_mac_enable_rx_dma_dummy(struct ngbe_hw *TUP0, u32 TUP1)
64 return NGBE_ERR_OPS_DUMMY;
66 static inline s32 ngbe_mac_disable_sec_rx_path_dummy(struct ngbe_hw *TUP0)
68 return NGBE_ERR_OPS_DUMMY;
70 static inline s32 ngbe_mac_enable_sec_rx_path_dummy(struct ngbe_hw *TUP0)
72 return NGBE_ERR_OPS_DUMMY;
74 static inline s32 ngbe_mac_acquire_swfw_sync_dummy(struct ngbe_hw *TUP0,
77 return NGBE_ERR_OPS_DUMMY;
79 static inline void ngbe_mac_release_swfw_sync_dummy(struct ngbe_hw *TUP0,
83 static inline s32 ngbe_mac_setup_link_dummy(struct ngbe_hw *TUP0, u32 TUP1,
86 return NGBE_ERR_OPS_DUMMY;
88 static inline s32 ngbe_mac_check_link_dummy(struct ngbe_hw *TUP0, u32 *TUP1,
89 bool *TUP3, bool TUP4)
91 return NGBE_ERR_OPS_DUMMY;
93 static inline s32 ngbe_mac_get_link_capabilities_dummy(struct ngbe_hw *TUP0,
94 u32 *TUP1, bool *TUP2)
96 return NGBE_ERR_OPS_DUMMY;
98 static inline s32 ngbe_mac_set_rar_dummy(struct ngbe_hw *TUP0, u32 TUP1,
99 u8 *TUP2, u32 TUP3, u32 TUP4)
101 return NGBE_ERR_OPS_DUMMY;
103 static inline s32 ngbe_mac_clear_rar_dummy(struct ngbe_hw *TUP0, u32 TUP1)
105 return NGBE_ERR_OPS_DUMMY;
107 static inline s32 ngbe_mac_set_vmdq_dummy(struct ngbe_hw *TUP0, u32 TUP1,
110 return NGBE_ERR_OPS_DUMMY;
112 static inline s32 ngbe_mac_clear_vmdq_dummy(struct ngbe_hw *TUP0, u32 TUP1,
115 return NGBE_ERR_OPS_DUMMY;
117 static inline s32 ngbe_mac_init_rx_addrs_dummy(struct ngbe_hw *TUP0)
119 return NGBE_ERR_OPS_DUMMY;
121 static inline s32 ngbe_mac_init_thermal_ssth_dummy(struct ngbe_hw *TUP0)
123 return NGBE_ERR_OPS_DUMMY;
125 static inline s32 ngbe_mac_check_overtemp_dummy(struct ngbe_hw *TUP0)
127 return NGBE_ERR_OPS_DUMMY;
129 /* struct ngbe_phy_operations */
130 static inline s32 ngbe_phy_identify_dummy(struct ngbe_hw *TUP0)
132 return NGBE_ERR_OPS_DUMMY;
134 static inline s32 ngbe_phy_init_hw_dummy(struct ngbe_hw *TUP0)
136 return NGBE_ERR_OPS_DUMMY;
138 static inline s32 ngbe_phy_reset_hw_dummy(struct ngbe_hw *TUP0)
140 return NGBE_ERR_OPS_DUMMY;
142 static inline s32 ngbe_phy_read_reg_dummy(struct ngbe_hw *TUP0, u32 TUP1,
145 return NGBE_ERR_OPS_DUMMY;
147 static inline s32 ngbe_phy_write_reg_dummy(struct ngbe_hw *TUP0, u32 TUP1,
150 return NGBE_ERR_OPS_DUMMY;
152 static inline s32 ngbe_phy_read_reg_unlocked_dummy(struct ngbe_hw *TUP0,
153 u32 TUP1, u32 TUP2, u16 *TUP3)
155 return NGBE_ERR_OPS_DUMMY;
157 static inline s32 ngbe_phy_write_reg_unlocked_dummy(struct ngbe_hw *TUP0,
158 u32 TUP1, u32 TUP2, u16 TUP3)
160 return NGBE_ERR_OPS_DUMMY;
162 static inline s32 ngbe_phy_setup_link_dummy(struct ngbe_hw *TUP0,
165 return NGBE_ERR_OPS_DUMMY;
167 static inline s32 ngbe_phy_check_link_dummy(struct ngbe_hw *TUP0, u32 *TUP1,
170 return NGBE_ERR_OPS_DUMMY;
172 static inline void ngbe_init_ops_dummy(struct ngbe_hw *hw)
174 hw->bus.set_lan_id = ngbe_bus_set_lan_id_dummy;
175 hw->rom.init_params = ngbe_rom_init_params_dummy;
176 hw->rom.validate_checksum = ngbe_rom_validate_checksum_dummy;
177 hw->mac.init_hw = ngbe_mac_init_hw_dummy;
178 hw->mac.reset_hw = ngbe_mac_reset_hw_dummy;
179 hw->mac.start_hw = ngbe_mac_start_hw_dummy;
180 hw->mac.stop_hw = ngbe_mac_stop_hw_dummy;
181 hw->mac.get_mac_addr = ngbe_mac_get_mac_addr_dummy;
182 hw->mac.enable_rx_dma = ngbe_mac_enable_rx_dma_dummy;
183 hw->mac.disable_sec_rx_path = ngbe_mac_disable_sec_rx_path_dummy;
184 hw->mac.enable_sec_rx_path = ngbe_mac_enable_sec_rx_path_dummy;
185 hw->mac.acquire_swfw_sync = ngbe_mac_acquire_swfw_sync_dummy;
186 hw->mac.release_swfw_sync = ngbe_mac_release_swfw_sync_dummy;
187 hw->mac.setup_link = ngbe_mac_setup_link_dummy;
188 hw->mac.check_link = ngbe_mac_check_link_dummy;
189 hw->mac.get_link_capabilities = ngbe_mac_get_link_capabilities_dummy;
190 hw->mac.set_rar = ngbe_mac_set_rar_dummy;
191 hw->mac.clear_rar = ngbe_mac_clear_rar_dummy;
192 hw->mac.set_vmdq = ngbe_mac_set_vmdq_dummy;
193 hw->mac.clear_vmdq = ngbe_mac_clear_vmdq_dummy;
194 hw->mac.init_rx_addrs = ngbe_mac_init_rx_addrs_dummy;
195 hw->mac.init_thermal_sensor_thresh = ngbe_mac_init_thermal_ssth_dummy;
196 hw->mac.check_overtemp = ngbe_mac_check_overtemp_dummy;
197 hw->phy.identify = ngbe_phy_identify_dummy;
198 hw->phy.init_hw = ngbe_phy_init_hw_dummy;
199 hw->phy.reset_hw = ngbe_phy_reset_hw_dummy;
200 hw->phy.read_reg = ngbe_phy_read_reg_dummy;
201 hw->phy.write_reg = ngbe_phy_write_reg_dummy;
202 hw->phy.read_reg_unlocked = ngbe_phy_read_reg_unlocked_dummy;
203 hw->phy.write_reg_unlocked = ngbe_phy_write_reg_unlocked_dummy;
204 hw->phy.setup_link = ngbe_phy_setup_link_dummy;
205 hw->phy.check_link = ngbe_phy_check_link_dummy;
208 #endif /* _NGBE_TYPE_DUMMY_H_ */