]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MLK-10060 ARM: i.MX6: disable ethernet phy AR8031 EEE mode in default
authorFugang Duan <b38611@freescale.com>
Thu, 25 Dec 2014 09:17:49 +0000 (17:17 +0800)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:18:53 +0000 (21:18 -0600)
Disable ethernet phy AR8031 EEE mode in default to reduce the IEEE1588
latency.

Signed-off-by: Fugang Duan <B38611@freescale.com>
arch/arm/mach-imx/mach-imx6q.c
arch/arm/mach-imx/mach-imx6sx.c

index 008e88b0f4abf8c75fc5c265ffc0e8d63e927ff2..97067f809cd5120d38d47b464498facd59fa5d7e 100644 (file)
@@ -178,6 +178,14 @@ static int ar8031_phy_fixup(struct phy_device *dev)
 {
        u16 val;
 
+       /* disable phy AR8031 SmartEEE function. */
+       phy_write(dev, 0xd, 0x3);
+       phy_write(dev, 0xe, 0x805d);
+       phy_write(dev, 0xd, 0x4003);
+       val = phy_read(dev, 0xe);
+       val &= ~(0x1 << 8);
+       phy_write(dev, 0xe, val);
+
        /* To enable AR8031 output a 125MHz clk from CLK_25M */
        phy_write(dev, 0xd, 0x7);
        phy_write(dev, 0xe, 0x8016);
index 3ec73b407cf2c9e41433ee77068b60e05d79588d..a23a6f7fc55ab07a0aff910f6f2aabdd6371b1cf 100755 (executable)
@@ -102,6 +102,14 @@ static int ar8031_phy_fixup(struct phy_device *dev)
        phy_write(dev, 0x1d, 0x1f);
        phy_write(dev, 0x1e, 0x8);
 
+       /* disable phy AR8031 SmartEEE function. */
+       phy_write(dev, 0xd, 0x3);
+       phy_write(dev, 0xe, 0x805d);
+       phy_write(dev, 0xd, 0x4003);
+       val = phy_read(dev, 0xe);
+       val &= ~(0x1 << 8);
+       phy_write(dev, 0xe, val);
+
        /* introduce tx clock delay */
        phy_write(dev, 0x1d, 0x5);
        val = phy_read(dev, 0x1e);