]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: phy: dp83867: io impedance is not dependent on RGMII delay
authorGrygorii Strashko <grygorii.strashko@ti.com>
Mon, 18 Nov 2019 21:04:45 +0000 (23:04 +0200)
committerJoe Hershberger <joe.hershberger@ni.com>
Mon, 9 Dec 2019 15:47:42 +0000 (09:47 -0600)
Based on commit 27708eb5481b ("net: phy: dp83867: IO impedance is not
dependent on RGMII delay") of mainline linux kernel.

The driver would only set the IO impedance value when RGMII internal delays
were enabled.  There is no reason for this.  Move the IO impedance block
out of the RGMII delay block.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/phy/dp83867.c

index 1721f6892bd5d854c05f50f7f6f23b3344ee2797..f9bb9256468b9f2be34e059f7ce7b686f4f7f261 100644 (file)
@@ -351,17 +351,17 @@ static int dp83867_config(struct phy_device *phydev)
 
                phy_write_mmd(phydev, DP83867_DEVADDR,
                              DP83867_RGMIIDCTL, delay);
+       }
 
-               if (dp83867->io_impedance >= 0) {
-                       val = phy_read_mmd(phydev,
-                                          DP83867_DEVADDR,
-                                          DP83867_IO_MUX_CFG);
-                       val &= ~DP83867_IO_MUX_CFG_IO_IMPEDANCE_CTRL;
-                       val |= dp83867->io_impedance &
-                              DP83867_IO_MUX_CFG_IO_IMPEDANCE_CTRL;
-                       phy_write_mmd(phydev, DP83867_DEVADDR,
-                                     DP83867_IO_MUX_CFG, val);
-               }
+       if (dp83867->io_impedance >= 0) {
+               val = phy_read_mmd(phydev,
+                                  DP83867_DEVADDR,
+                                  DP83867_IO_MUX_CFG);
+               val &= ~DP83867_IO_MUX_CFG_IO_IMPEDANCE_CTRL;
+               val |= dp83867->io_impedance &
+                      DP83867_IO_MUX_CFG_IO_IMPEDANCE_CTRL;
+               phy_write_mmd(phydev, DP83867_DEVADDR,
+                             DP83867_IO_MUX_CFG, val);
        }
 
        if (dp83867->port_mirroring != DP83867_PORT_MIRRORING_KEEP)