]> git.sur5r.net Git - u-boot/commitdiff
net: phy: marvell 88e151x: Fix handling of bare RGMII interface type
authorMario Six <mario.six@gdsys.cc>
Mon, 15 Jan 2018 10:08:25 +0000 (11:08 +0100)
committerJoe Hershberger <joe.hershberger@ni.com>
Mon, 26 Feb 2018 21:47:07 +0000 (15:47 -0600)
Commit 68e6ecadc551 ("net: phy: marvell 88e151x: Fix handling of RGMII
interface types") fixed the initialization of 88e151x phys, but made it
so that interfaces of type PHY_INTERFACE_MODE_RGMII had both RX and TX
delay bits cleared. The default (like in m88e1111s_config) is to have
both bits set.

Hence, this patch changes the behavior in the PHY_INTERFACE_MODE_RGMII
case so that both bits are set.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/phy/marvell.c

index b05afc1ac4a9f6fcc9fc212d6eeb69f35d726f45..293234045509b3c83a36691559ec140429277db4 100644 (file)
@@ -382,7 +382,8 @@ static int m88e1518_config(struct phy_device *phydev)
 
                reg = phy_read(phydev, MDIO_DEVAD_NONE, MIIM_88E151x_PHY_MSCR);
                reg &= ~MIIM_88E151x_RGMII_RXTX_DELAY;
-               if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
+               if (phydev->interface == PHY_INTERFACE_MODE_RGMII ||
+                   phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
                        reg |= MIIM_88E151x_RGMII_RXTX_DELAY;
                else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID)
                        reg |= MIIM_88E151x_RGMII_RX_DELAY;