OSDN Git Service

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[uclinux-h8/linux.git] / drivers / net / ethernet / marvell / mvpp2 / mvpp2_main.c
index c944434..e087547 100644 (file)
@@ -1165,28 +1165,13 @@ static void mvpp22_gop_setup_irq(struct mvpp2_port *port)
  */
 static int mvpp22_comphy_init(struct mvpp2_port *port)
 {
-       enum phy_mode mode;
        int ret;
 
        if (!port->comphy)
                return 0;
 
-       switch (port->phy_interface) {
-       case PHY_INTERFACE_MODE_SGMII:
-       case PHY_INTERFACE_MODE_1000BASEX:
-               mode = PHY_MODE_SGMII;
-               break;
-       case PHY_INTERFACE_MODE_2500BASEX:
-               mode = PHY_MODE_2500SGMII;
-               break;
-       case PHY_INTERFACE_MODE_10GKR:
-               mode = PHY_MODE_10GKR;
-               break;
-       default:
-               return -EINVAL;
-       }
-
-       ret = phy_set_mode(port->comphy, mode);
+       ret = phy_set_mode_ext(port->comphy, PHY_MODE_ETHERNET,
+                              port->phy_interface);
        if (ret)
                return ret;