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_stop_hw_dummy(struct ngbe_hw *TUP0)
52 return NGBE_ERR_OPS_DUMMY;
54 static inline s32 ngbe_mac_acquire_swfw_sync_dummy(struct ngbe_hw *TUP0,
57 return NGBE_ERR_OPS_DUMMY;
59 static inline void ngbe_mac_release_swfw_sync_dummy(struct ngbe_hw *TUP0,
63 static inline s32 ngbe_mac_init_thermal_ssth_dummy(struct ngbe_hw *TUP0)
65 return NGBE_ERR_OPS_DUMMY;
67 static inline s32 ngbe_mac_check_overtemp_dummy(struct ngbe_hw *TUP0)
69 return NGBE_ERR_OPS_DUMMY;
71 /* struct ngbe_phy_operations */
72 static inline s32 ngbe_phy_identify_dummy(struct ngbe_hw *TUP0)
74 return NGBE_ERR_OPS_DUMMY;
76 static inline s32 ngbe_phy_reset_hw_dummy(struct ngbe_hw *TUP0)
78 return NGBE_ERR_OPS_DUMMY;
80 static inline s32 ngbe_phy_read_reg_dummy(struct ngbe_hw *TUP0, u32 TUP1,
83 return NGBE_ERR_OPS_DUMMY;
85 static inline s32 ngbe_phy_write_reg_dummy(struct ngbe_hw *TUP0, u32 TUP1,
88 return NGBE_ERR_OPS_DUMMY;
90 static inline s32 ngbe_phy_read_reg_unlocked_dummy(struct ngbe_hw *TUP0,
91 u32 TUP1, u32 TUP2, u16 *TUP3)
93 return NGBE_ERR_OPS_DUMMY;
95 static inline s32 ngbe_phy_write_reg_unlocked_dummy(struct ngbe_hw *TUP0,
96 u32 TUP1, u32 TUP2, u16 TUP3)
98 return NGBE_ERR_OPS_DUMMY;
100 static inline void ngbe_init_ops_dummy(struct ngbe_hw *hw)
102 hw->bus.set_lan_id = ngbe_bus_set_lan_id_dummy;
103 hw->rom.init_params = ngbe_rom_init_params_dummy;
104 hw->rom.validate_checksum = ngbe_rom_validate_checksum_dummy;
105 hw->mac.init_hw = ngbe_mac_init_hw_dummy;
106 hw->mac.reset_hw = ngbe_mac_reset_hw_dummy;
107 hw->mac.stop_hw = ngbe_mac_stop_hw_dummy;
108 hw->mac.acquire_swfw_sync = ngbe_mac_acquire_swfw_sync_dummy;
109 hw->mac.release_swfw_sync = ngbe_mac_release_swfw_sync_dummy;
110 hw->mac.init_thermal_sensor_thresh = ngbe_mac_init_thermal_ssth_dummy;
111 hw->mac.check_overtemp = ngbe_mac_check_overtemp_dummy;
112 hw->phy.identify = ngbe_phy_identify_dummy;
113 hw->phy.reset_hw = ngbe_phy_reset_hw_dummy;
114 hw->phy.read_reg = ngbe_phy_read_reg_dummy;
115 hw->phy.write_reg = ngbe_phy_write_reg_dummy;
116 hw->phy.read_reg_unlocked = ngbe_phy_read_reg_unlocked_dummy;
117 hw->phy.write_reg_unlocked = ngbe_phy_write_reg_unlocked_dummy;
120 #endif /* _NGBE_TYPE_DUMMY_H_ */