]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00159982 - [MX6Q]: Add FEC phy save power function.
authorFugang Duan <B38611@freescale.com>
Fri, 4 Nov 2011 08:21:31 +0000 (16:21 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:09:57 +0000 (14:09 +0200)
- Set Phy AR8031 to saving power mode while no cable connect.

Signed-off-by: Fugang Duan <B38611@freescale.com>
arch/arm/mach-mx6/board-mx6q_arm2.c

index a6e57d9bc4f75109281fd7ae1d571fd255aa3121..01a15200bf7ecc7c8ac83bf488b9ffd1f686d3d9 100644 (file)
@@ -497,8 +497,23 @@ static int mx6q_arm2_fec_phy_init(struct phy_device *phydev)
        return 0;
 }
 
+static int mx6q_arm2_fec_power_hibernate(struct phy_device *phydev)
+{
+       unsigned short val;
+
+       /*set AR8031 debug reg 0xb to hibernate power*/
+       phy_write(phydev, 0x1d, 0xb);
+       val = phy_read(phydev, 0x1e);
+
+       val |= 0x8000;
+       phy_write(phydev, 0x1e, val);
+
+       return 0;
+}
+
 static struct fec_platform_data fec_data __initdata = {
        .init = mx6q_arm2_fec_phy_init,
+       .power_hibernate = mx6q_arm2_fec_power_hibernate,
        .phy = PHY_INTERFACE_MODE_RGMII,
 };