Lines Matching refs:phydev
34 static int xilinxphy_startup(struct phy_device *phydev) in xilinxphy_startup() argument
43 err = genphy_update_link(phydev); in xilinxphy_startup()
47 if (AUTONEG_ENABLE == phydev->autoneg) { in xilinxphy_startup()
48 status = phy_read(phydev, MDIO_DEVAD_NONE, MII_LPA); in xilinxphy_startup()
52 phydev->duplex = DUPLEX_FULL; in xilinxphy_startup()
54 phydev->duplex = DUPLEX_HALF; in xilinxphy_startup()
58 phydev->speed = SPEED_1000; in xilinxphy_startup()
62 phydev->speed = SPEED_100; in xilinxphy_startup()
66 phydev->speed = SPEED_10; in xilinxphy_startup()
70 int bmcr = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR); in xilinxphy_startup()
76 phydev->duplex = DUPLEX_FULL; in xilinxphy_startup()
78 phydev->duplex = DUPLEX_HALF; in xilinxphy_startup()
81 phydev->speed = SPEED_1000; in xilinxphy_startup()
83 phydev->speed = SPEED_100; in xilinxphy_startup()
85 phydev->speed = SPEED_10; in xilinxphy_startup()
92 if (phydev->flags == XAE_PHY_TYPE_1000BASE_X) { in xilinxphy_startup()
93 phydev->duplex = DUPLEX_FULL; in xilinxphy_startup()
94 phydev->speed = SPEED_1000; in xilinxphy_startup()
100 static int xilinxphy_of_init(struct phy_device *phydev) in xilinxphy_of_init() argument
106 node = phy_get_ofnode(phydev); in xilinxphy_of_init()
112 phydev->flags |= XAE_PHY_TYPE_1000BASE_X; in xilinxphy_of_init()
117 static int xilinxphy_config(struct phy_device *phydev) in xilinxphy_config() argument
122 xilinxphy_of_init(phydev); in xilinxphy_config()
123 temp = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMCR); in xilinxphy_config()
125 phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, temp); in xilinxphy_config()