Lines Matching refs:phydev

78 static int vsc824x_add_skew(struct phy_device *phydev)  in vsc824x_add_skew()  argument
83 extcon = phy_read(phydev, MII_VSC8244_EXT_CON1); in vsc824x_add_skew()
94 err = phy_write(phydev, MII_VSC8244_EXT_CON1, extcon); in vsc824x_add_skew()
99 static int vsc824x_config_init(struct phy_device *phydev) in vsc824x_config_init() argument
103 err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT, in vsc824x_config_init()
108 if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) in vsc824x_config_init()
109 err = vsc824x_add_skew(phydev); in vsc824x_config_init()
114 static int vsc824x_ack_interrupt(struct phy_device *phydev) in vsc824x_ack_interrupt() argument
122 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in vsc824x_ack_interrupt()
123 err = phy_read(phydev, MII_VSC8244_ISTAT); in vsc824x_ack_interrupt()
128 static int vsc82xx_config_intr(struct phy_device *phydev) in vsc82xx_config_intr() argument
132 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in vsc82xx_config_intr()
133 err = phy_write(phydev, MII_VSC8244_IMASK, in vsc82xx_config_intr()
134 (phydev->drv->phy_id == PHY_ID_VSC8234 || in vsc82xx_config_intr()
135 phydev->drv->phy_id == PHY_ID_VSC8244 || in vsc82xx_config_intr()
136 phydev->drv->phy_id == PHY_ID_VSC8514 || in vsc82xx_config_intr()
137 phydev->drv->phy_id == PHY_ID_VSC8574 || in vsc82xx_config_intr()
138 phydev->drv->phy_id == PHY_ID_VSC8601) ? in vsc82xx_config_intr()
145 err = phy_read(phydev, MII_VSC8244_ISTAT); in vsc82xx_config_intr()
150 err = phy_write(phydev, MII_VSC8244_IMASK, 0); in vsc82xx_config_intr()
156 static int vsc8221_config_init(struct phy_device *phydev) in vsc8221_config_init() argument
160 err = phy_write(phydev, MII_VSC8244_AUX_CONSTAT, in vsc8221_config_init()
175 static int vsc82x4_config_autocross_enable(struct phy_device *phydev) in vsc82x4_config_autocross_enable() argument
179 if (phydev->autoneg == AUTONEG_ENABLE || phydev->speed > SPEED_100) in vsc82x4_config_autocross_enable()
183 ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_ACCESS, 0x52b5); in vsc82x4_config_autocross_enable()
185 ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_18E, 0x0012); in vsc82x4_config_autocross_enable()
187 ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_17E, 0x2803); in vsc82x4_config_autocross_enable()
189 ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_16E, 0x87fa); in vsc82x4_config_autocross_enable()
192 ret = phy_write(phydev, MII_VSC82X4_EXT_PAGE_ACCESS, 0x0000); in vsc82x4_config_autocross_enable()
194 phy_write(phydev, MII_VSC82X4_EXT_PAGE_ACCESS, 0x0000); in vsc82x4_config_autocross_enable()
207 static int vsc82x4_config_aneg(struct phy_device *phydev) in vsc82x4_config_aneg() argument
214 if (phydev->autoneg != AUTONEG_ENABLE && phydev->speed <= SPEED_100) { in vsc82x4_config_aneg()
215 ret = genphy_setup_forced(phydev); in vsc82x4_config_aneg()
220 return vsc82x4_config_autocross_enable(phydev); in vsc82x4_config_aneg()
223 return genphy_config_aneg(phydev); in vsc82x4_config_aneg()