Message ID | 20191118210447.7433-7-grygorii.strashko@ti.com |
---|---|
State | Accepted |
Commit | 253a5ff8712c4dc5821ebdc4e4124901d37c0339 |
Delegated to: | Joe Hershberger |
Headers | show |
Series | net: phy: dp83867: ti: sync with linux kernel and | expand |
On Mon, Nov 18, 2019 at 3:31 PM Grygorii Strashko <grygorii.strashko@ti.com> wrote: > > 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>
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 1721f6892b..f9bb925646 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -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)
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> --- drivers/net/phy/dp83867.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)