diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2018-11-19 19:24:22 -0600 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2018-12-12 10:01:35 +0530 |
commit | c8fe6d7f3f8345ba1d4b4f38d3163f6f94412f0a (patch) | |
tree | 061fcfdbf798eb3d89df89a7850a6b8d8726f91a /drivers/net | |
parent | 2af8caeee47846a84bc96abc3a72f7c991153040 (diff) | |
download | linux-c8fe6d7f3f8345ba1d4b4f38d3163f6f94412f0a.tar.gz linux-c8fe6d7f3f8345ba1d4b4f38d3163f6f94412f0a.tar.bz2 linux-c8fe6d7f3f8345ba1d4b4f38d3163f6f94412f0a.zip |
phy: ocelot-serdes: convert to use eth phy mode and submode
Convert ocelot-serdes PHY driver to use recently introduced
PHY_MODE_ETHERNET and phy_set_mode_ext().
Cc: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Quentin Schulz <quentin.schulz@bootlin.com>
Tested-by: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c index 3238b9ee42f3..3edb6082c670 100644 --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c @@ -472,7 +472,6 @@ static int ocelot_port_open(struct net_device *dev) { struct ocelot_port *port = netdev_priv(dev); struct ocelot *ocelot = port->ocelot; - enum phy_mode phy_mode; int err; /* Enable receiving frames on the port, and activate auto-learning of @@ -484,12 +483,8 @@ static int ocelot_port_open(struct net_device *dev) ANA_PORT_PORT_CFG, port->chip_port); if (port->serdes) { - if (port->phy_mode == PHY_INTERFACE_MODE_SGMII) - phy_mode = PHY_MODE_SGMII; - else - phy_mode = PHY_MODE_QSGMII; - - err = phy_set_mode(port->serdes, phy_mode); + err = phy_set_mode_ext(port->serdes, PHY_MODE_ETHERNET, + port->phy_mode); if (err) { netdev_err(dev, "Could not set mode of SerDes\n"); return err; |