Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/igc/igc_i225.c
Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* igc_init_phy_params_i225 - Init PHY func ptrs. | * igc_init_phy_params_i225 - Init PHY func ptrs. | ||||
* @hw: pointer to the HW structure | * @hw: pointer to the HW structure | ||||
**/ | **/ | ||||
static s32 igc_init_phy_params_i225(struct igc_hw *hw) | static s32 igc_init_phy_params_i225(struct igc_hw *hw) | ||||
{ | { | ||||
struct igc_phy_info *phy = &hw->phy; | struct igc_phy_info *phy = &hw->phy; | ||||
s32 ret_val = IGC_SUCCESS; | s32 ret_val = IGC_SUCCESS; | ||||
u32 ctrl_ext; | |||||
DEBUGFUNC("igc_init_phy_params_i225"); | DEBUGFUNC("igc_init_phy_params_i225"); | ||||
if (hw->phy.media_type != igc_media_type_copper) { | if (hw->phy.media_type != igc_media_type_copper) { | ||||
phy->type = igc_phy_none; | phy->type = igc_phy_none; | ||||
goto out; | goto out; | ||||
} | } | ||||
phy->ops.power_up = igc_power_up_phy_copper; | phy->ops.power_up = igc_power_up_phy_copper; | ||||
phy->ops.power_down = igc_power_down_phy_copper_base; | phy->ops.power_down = igc_power_down_phy_copper_base; | ||||
phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT_2500; | phy->autoneg_mask = AUTONEG_ADVERTISE_SPEED_DEFAULT_2500; | ||||
phy->reset_delay_us = 100; | phy->reset_delay_us = 100; | ||||
phy->ops.acquire = igc_acquire_phy_base; | phy->ops.acquire = igc_acquire_phy_base; | ||||
phy->ops.check_reset_block = igc_check_reset_block_generic; | phy->ops.check_reset_block = igc_check_reset_block_generic; | ||||
phy->ops.commit = igc_phy_sw_reset_generic; | |||||
phy->ops.release = igc_release_phy_base; | phy->ops.release = igc_release_phy_base; | ||||
phy->ops.reset = igc_phy_hw_reset_generic; | |||||
phy->ops.read_reg = igc_read_phy_reg_gpy; | |||||
phy->ops.write_reg = igc_write_phy_reg_gpy; | |||||
ctrl_ext = IGC_READ_REG(hw, IGC_CTRL_EXT); | |||||
/* Make sure the PHY is in a good state. Several people have reported | /* Make sure the PHY is in a good state. Several people have reported | ||||
* firmware leaving the PHY's page select register set to something | * firmware leaving the PHY's page select register set to something | ||||
* other than the default of zero, which causes the PHY ID read to | * other than the default of zero, which causes the PHY ID read to | ||||
* access something other than the intended register. | * access something other than the intended register. | ||||
*/ | */ | ||||
ret_val = hw->phy.ops.reset(hw); | ret_val = hw->phy.ops.reset(hw); | ||||
if (ret_val) | if (ret_val) | ||||
goto out; | goto out; | ||||
IGC_WRITE_REG(hw, IGC_CTRL_EXT, ctrl_ext); | |||||
phy->ops.read_reg = igc_read_phy_reg_gpy; | |||||
phy->ops.write_reg = igc_write_phy_reg_gpy; | |||||
ret_val = igc_get_phy_id(hw); | ret_val = igc_get_phy_id(hw); | ||||
/* Verify phy id and set remaining function pointers */ | /* Verify phy id and set remaining function pointers */ | ||||
switch (phy->id) { | switch (phy->id) { | ||||
case I225_I_PHY_ID: | case I225_I_PHY_ID: | ||||
phy->type = igc_phy_i225; | phy->type = igc_phy_i225; | ||||
phy->ops.set_d0_lplu_state = igc_set_d0_lplu_state_i225; | phy->ops.set_d0_lplu_state = igc_set_d0_lplu_state_i225; | ||||
phy->ops.set_d3_lplu_state = igc_set_d3_lplu_state_i225; | phy->ops.set_d3_lplu_state = igc_set_d3_lplu_state_i225; | ||||
▲ Show 20 Lines • Show All 1,050 Lines • Show Last 20 Lines |