Lines Matching refs:phy_data
88 u16 phy_data; in atl1c_get_permanent_address() local
109 atl1c_read_phy_dbg(hw, MIIDBG_ANACTRL, &phy_data); in atl1c_get_permanent_address()
110 phy_data &= ~ANACTRL_HB_EN; in atl1c_get_permanent_address()
111 atl1c_write_phy_dbg(hw, MIIDBG_ANACTRL, phy_data); in atl1c_get_permanent_address()
112 atl1c_read_phy_dbg(hw, MIIDBG_VOLT_CTRL, &phy_data); in atl1c_get_permanent_address()
113 phy_data |= VOLT_CTRL_SWLOWEST; in atl1c_get_permanent_address()
114 atl1c_write_phy_dbg(hw, MIIDBG_VOLT_CTRL, phy_data); in atl1c_get_permanent_address()
138 atl1c_read_phy_dbg(hw, MIIDBG_ANACTRL, &phy_data); in atl1c_get_permanent_address()
139 phy_data |= ANACTRL_HB_EN; in atl1c_get_permanent_address()
140 atl1c_write_phy_dbg(hw, MIIDBG_ANACTRL, phy_data); in atl1c_get_permanent_address()
141 atl1c_read_phy_dbg(hw, MIIDBG_VOLT_CTRL, &phy_data); in atl1c_get_permanent_address()
142 phy_data &= ~VOLT_CTRL_SWLOWEST; in atl1c_get_permanent_address()
143 atl1c_write_phy_dbg(hw, MIIDBG_VOLT_CTRL, phy_data); in atl1c_get_permanent_address()
316 u16 reg, u16 *phy_data) in atl1c_read_phy_core() argument
323 *phy_data = 0; in atl1c_read_phy_core()
350 *phy_data = (u16)FIELD_GETX(val, MDIO_CTRL_DATA); in atl1c_read_phy_core()
365 u16 reg, u16 phy_data) in atl1c_write_phy_core() argument
383 FIELDX(MDIO_CTRL_DATA, phy_data) | in atl1c_write_phy_core()
389 FIELDX(MDIO_CTRL_DATA, phy_data) | in atl1c_write_phy_core()
408 int atl1c_read_phy_reg(struct atl1c_hw *hw, u16 reg_addr, u16 *phy_data) in atl1c_read_phy_reg() argument
410 return atl1c_read_phy_core(hw, false, 0, reg_addr, phy_data); in atl1c_read_phy_reg()
419 int atl1c_write_phy_reg(struct atl1c_hw *hw, u32 reg_addr, u16 phy_data) in atl1c_write_phy_reg() argument
421 return atl1c_write_phy_core(hw, false, 0, reg_addr, phy_data); in atl1c_write_phy_reg()
426 u16 reg_addr, u16 *phy_data) in atl1c_read_phy_ext() argument
428 return atl1c_read_phy_core(hw, true, dev_addr, reg_addr, phy_data); in atl1c_read_phy_ext()
433 u16 reg_addr, u16 phy_data) in atl1c_write_phy_ext() argument
435 return atl1c_write_phy_core(hw, true, dev_addr, reg_addr, phy_data); in atl1c_write_phy_ext()
438 int atl1c_read_phy_dbg(struct atl1c_hw *hw, u16 reg_addr, u16 *phy_data) in atl1c_read_phy_dbg() argument
446 err = atl1c_read_phy_reg(hw, MII_DBG_DATA, phy_data); in atl1c_read_phy_dbg()
451 int atl1c_write_phy_dbg(struct atl1c_hw *hw, u16 reg_addr, u16 phy_data) in atl1c_write_phy_dbg() argument
459 err = atl1c_write_phy_reg(hw, MII_DBG_DATA, phy_data); in atl1c_write_phy_dbg()
514 u16 phy_data; in atl1c_phy_reset() local
536 atl1c_read_phy_dbg(hw, MIIDBG_CFGLPSPD, &phy_data); in atl1c_phy_reset()
538 phy_data & ~CFGLPSPD_RSTCNT_CLK125SW); in atl1c_phy_reset()
543 atl1c_read_phy_dbg(hw, MIIDBG_CABLE1TH_DET, &phy_data); in atl1c_phy_reset()
544 phy_data |= CABLE1TH_DET_EN; in atl1c_phy_reset()
545 atl1c_write_phy_dbg(hw, MIIDBG_CABLE1TH_DET, phy_data); in atl1c_phy_reset()
551 atl1c_read_phy_dbg(hw, MIIDBG_VOLT_CTRL, &phy_data); in atl1c_phy_reset()
552 phy_data &= ~VOLT_CTRL_SWLOWEST; in atl1c_phy_reset()
553 atl1c_write_phy_dbg(hw, MIIDBG_VOLT_CTRL, phy_data); in atl1c_phy_reset()
556 phy_data = in atl1c_phy_reset()
559 atl1c_write_phy_dbg(hw, MIIDBG_LEGCYPS, phy_data); in atl1c_phy_reset()
565 atl1c_read_phy_dbg(hw, MIIDBG_LEGCYPS, &phy_data); in atl1c_phy_reset()
567 phy_data & ~LEGCYPS_EN); in atl1c_phy_reset()
569 atl1c_read_phy_dbg(hw, MIIDBG_HIBNEG, &phy_data); in atl1c_phy_reset()
571 phy_data & HIBNEG_PSHIB_EN); in atl1c_phy_reset()
592 phy_data = IER_LINK_UP | IER_LINK_DOWN; in atl1c_phy_reset()
593 err = atl1c_write_phy_reg(hw, MII_IER, phy_data); in atl1c_phy_reset()
662 u16 phy_data; in atl1c_get_speed_and_duplex() local
665 err = atl1c_read_phy_reg(hw, MII_GIGA_PSSR, &phy_data); in atl1c_get_speed_and_duplex()
669 if (!(phy_data & GIGA_PSSR_SPD_DPLX_RESOLVED)) in atl1c_get_speed_and_duplex()
672 switch (phy_data & GIGA_PSSR_SPEED) { in atl1c_get_speed_and_duplex()
686 if (phy_data & GIGA_PSSR_DPLX) in atl1c_get_speed_and_duplex()
702 u16 phy_data; in atl1c_phy_to_ps_link() local
708 atl1c_read_phy_reg(hw, MII_BMSR, &phy_data); in atl1c_phy_to_ps_link()
709 atl1c_read_phy_reg(hw, MII_BMSR, &phy_data); in atl1c_phy_to_ps_link()
710 if (phy_data & BMSR_LSTATUS) { in atl1c_phy_to_ps_link()
733 atl1c_read_phy_reg(hw, MII_BMSR, &phy_data); in atl1c_phy_to_ps_link()
734 atl1c_read_phy_reg(hw, MII_BMSR, &phy_data); in atl1c_phy_to_ps_link()
735 if (phy_data & BMSR_LSTATUS) { in atl1c_phy_to_ps_link()
773 u16 phy_data; in atl1c_power_saving() local
816 atl1c_read_phy_reg(hw, MII_ISR, &phy_data); in atl1c_power_saving()