Lines Matching refs:phy_data
75 u16 phy_data; in atl1c_get_permanent_address() local
96 atl1c_read_phy_dbg(hw, MIIDBG_ANACTRL, &phy_data); in atl1c_get_permanent_address()
97 phy_data &= ~ANACTRL_HB_EN; in atl1c_get_permanent_address()
98 atl1c_write_phy_dbg(hw, MIIDBG_ANACTRL, phy_data); in atl1c_get_permanent_address()
99 atl1c_read_phy_dbg(hw, MIIDBG_VOLT_CTRL, &phy_data); in atl1c_get_permanent_address()
100 phy_data |= VOLT_CTRL_SWLOWEST; in atl1c_get_permanent_address()
101 atl1c_write_phy_dbg(hw, MIIDBG_VOLT_CTRL, phy_data); in atl1c_get_permanent_address()
125 atl1c_read_phy_dbg(hw, MIIDBG_ANACTRL, &phy_data); in atl1c_get_permanent_address()
126 phy_data |= ANACTRL_HB_EN; in atl1c_get_permanent_address()
127 atl1c_write_phy_dbg(hw, MIIDBG_ANACTRL, phy_data); in atl1c_get_permanent_address()
128 atl1c_read_phy_dbg(hw, MIIDBG_VOLT_CTRL, &phy_data); in atl1c_get_permanent_address()
129 phy_data &= ~VOLT_CTRL_SWLOWEST; in atl1c_get_permanent_address()
130 atl1c_write_phy_dbg(hw, MIIDBG_VOLT_CTRL, phy_data); in atl1c_get_permanent_address()
303 u16 reg, u16 *phy_data) in atl1c_read_phy_core() argument
310 *phy_data = 0; in atl1c_read_phy_core()
337 *phy_data = (u16)FIELD_GETX(val, MDIO_CTRL_DATA); in atl1c_read_phy_core()
352 u16 reg, u16 phy_data) in atl1c_write_phy_core() argument
370 FIELDX(MDIO_CTRL_DATA, phy_data) | in atl1c_write_phy_core()
376 FIELDX(MDIO_CTRL_DATA, phy_data) | in atl1c_write_phy_core()
395 int atl1c_read_phy_reg(struct atl1c_hw *hw, u16 reg_addr, u16 *phy_data) in atl1c_read_phy_reg() argument
397 return atl1c_read_phy_core(hw, false, 0, reg_addr, phy_data); in atl1c_read_phy_reg()
406 int atl1c_write_phy_reg(struct atl1c_hw *hw, u32 reg_addr, u16 phy_data) in atl1c_write_phy_reg() argument
408 return atl1c_write_phy_core(hw, false, 0, reg_addr, phy_data); in atl1c_write_phy_reg()
413 u16 reg_addr, u16 *phy_data) in atl1c_read_phy_ext() argument
415 return atl1c_read_phy_core(hw, true, dev_addr, reg_addr, phy_data); in atl1c_read_phy_ext()
420 u16 reg_addr, u16 phy_data) in atl1c_write_phy_ext() argument
422 return atl1c_write_phy_core(hw, true, dev_addr, reg_addr, phy_data); in atl1c_write_phy_ext()
425 int atl1c_read_phy_dbg(struct atl1c_hw *hw, u16 reg_addr, u16 *phy_data) in atl1c_read_phy_dbg() argument
433 err = atl1c_read_phy_reg(hw, MII_DBG_DATA, phy_data); in atl1c_read_phy_dbg()
438 int atl1c_write_phy_dbg(struct atl1c_hw *hw, u16 reg_addr, u16 phy_data) in atl1c_write_phy_dbg() argument
446 err = atl1c_write_phy_reg(hw, MII_DBG_DATA, phy_data); in atl1c_write_phy_dbg()
501 u16 phy_data; in atl1c_phy_reset() local
523 atl1c_read_phy_dbg(hw, MIIDBG_CFGLPSPD, &phy_data); in atl1c_phy_reset()
525 phy_data & ~CFGLPSPD_RSTCNT_CLK125SW); in atl1c_phy_reset()
530 atl1c_read_phy_dbg(hw, MIIDBG_CABLE1TH_DET, &phy_data); in atl1c_phy_reset()
531 phy_data |= CABLE1TH_DET_EN; in atl1c_phy_reset()
532 atl1c_write_phy_dbg(hw, MIIDBG_CABLE1TH_DET, phy_data); in atl1c_phy_reset()
538 atl1c_read_phy_dbg(hw, MIIDBG_VOLT_CTRL, &phy_data); in atl1c_phy_reset()
539 phy_data &= ~VOLT_CTRL_SWLOWEST; in atl1c_phy_reset()
540 atl1c_write_phy_dbg(hw, MIIDBG_VOLT_CTRL, phy_data); in atl1c_phy_reset()
543 phy_data = in atl1c_phy_reset()
546 atl1c_write_phy_dbg(hw, MIIDBG_LEGCYPS, phy_data); in atl1c_phy_reset()
552 atl1c_read_phy_dbg(hw, MIIDBG_LEGCYPS, &phy_data); in atl1c_phy_reset()
554 phy_data & ~LEGCYPS_EN); in atl1c_phy_reset()
556 atl1c_read_phy_dbg(hw, MIIDBG_HIBNEG, &phy_data); in atl1c_phy_reset()
558 phy_data & HIBNEG_PSHIB_EN); in atl1c_phy_reset()
579 phy_data = IER_LINK_UP | IER_LINK_DOWN; in atl1c_phy_reset()
580 err = atl1c_write_phy_reg(hw, MII_IER, phy_data); in atl1c_phy_reset()
646 u16 phy_data; in atl1c_get_link_status() local
656 atl1c_read_phy_reg(hw, MII_BMSR, &phy_data); in atl1c_get_link_status()
657 atl1c_read_phy_reg(hw, MII_BMSR, &phy_data); in atl1c_get_link_status()
658 return !!(phy_data & BMSR_LSTATUS); in atl1c_get_link_status()
671 u16 phy_data; in atl1c_get_speed_and_duplex() local
683 err = atl1c_read_phy_reg(hw, MII_GIGA_PSSR, &phy_data); in atl1c_get_speed_and_duplex()
687 if (!(phy_data & GIGA_PSSR_SPD_DPLX_RESOLVED)) in atl1c_get_speed_and_duplex()
690 switch (phy_data & GIGA_PSSR_SPEED) { in atl1c_get_speed_and_duplex()
704 if (phy_data & GIGA_PSSR_DPLX) in atl1c_get_speed_and_duplex()
786 u16 phy_data; in atl1c_power_saving() local
829 atl1c_read_phy_reg(hw, MII_ISR, &phy_data); in atl1c_power_saving()