diff options
author | Ash Charles <ashcharles@gmail.com> | 2016-10-21 17:31:33 -0400 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2016-11-07 11:28:16 -0600 |
commit | f018545ef756c4bc567d1bbf153615833bc590b0 (patch) | |
tree | ce2e1fa7dcdb899a5f11c439d38d8e43fac2e5c0 /drivers/net | |
parent | 21622452f2eb735a5cfe8697edc3c166a71b8485 (diff) | |
download | u-boot-f018545ef756c4bc567d1bbf153615833bc590b0.zip u-boot-f018545ef756c4bc567d1bbf153615833bc590b0.tar.gz u-boot-f018545ef756c4bc567d1bbf153615833bc590b0.tar.bz2 |
net: phy: micrel: center FLP burst timing at 16ms
Like [1], reset the FLP burst timing for the KSZ9031 to the 16ms
specified by the IEEE802.3 standard from the chip's default of 8ms.
For more details, see the "Auto-Negotiation Timing" section of the
KSZ9031RNX datasheet.
[1] https://patchwork.kernel.org/patch/6558371/
Signed-off-by: Ash Charles <ash.charles@savoirfairelinux.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/phy/micrel.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 6b313a9..28a1401 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -415,11 +415,31 @@ static int ksz9031_of_config(struct phy_device *phydev) return 0; } + +static int ksz9031_center_flp_timing(struct phy_device *phydev) +{ + struct phy_driver *drv = phydev->drv; + int ret = 0; + + if (!drv || !drv->writeext) + return -EOPNOTSUPP; + + ret = drv->writeext(phydev, 0, 0, MII_KSZ9031_FLP_BURST_TX_LO, 0x1A80); + if (ret) + return ret; + + ret = drv->writeext(phydev, 0, 0, MII_KSZ9031_FLP_BURST_TX_HI, 0x6); + return ret; +} #else static int ksz9031_of_config(struct phy_device *phydev) { return 0; } +static int ksz9031_center_flp_timing(struct phy_device *phydev) +{ + return 0; +} #endif /* Accessors to extended registers*/ @@ -472,6 +492,9 @@ static int ksz9031_config(struct phy_device *phydev) ret = ksz9031_of_config(phydev); if (ret) return ret; + ret = ksz9031_center_flp_timing(phydev); + if (ret) + return ret; return genphy_config(phydev); } |