Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4117b5be4b877cec7c34058f0c239fcf78274e3d
Commit:     4117b5be4b877cec7c34058f0c239fcf78274e3d
Parent:     d3c12873c36005263286cf5660663c8c10f9d2b5
Author:     Kapil Juneja <[EMAIL PROTECTED]>
AuthorDate: Fri May 11 18:25:18 2007 -0500
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Sun Jul 8 22:16:38 2007 -0400

    phylib: m88e1111: enable SGMII mode
    
    If connected via SGMII, initialize with SGMII mode configured.
    
    Signed-off-by: Kapil Juneja <[EMAIL PROTECTED]>
    Signed-off-by: Andy Fleming <[EMAIL PROTECTED]>
    Signed-off-by: Kim Phillips <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/phy/marvell.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index b87f8d2..fbe1104 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -60,6 +60,7 @@
 #define MII_M1111_PHY_EXT_SR           0x1b
 #define MII_M1111_HWCFG_MODE_MASK      0xf
 #define MII_M1111_HWCFG_MODE_RGMII     0xb
+#define MII_M1111_HWCFG_MODE_SGMII_NO_CLK      0x4
 
 MODULE_DESCRIPTION("Marvell PHY driver");
 MODULE_AUTHOR("Andy Fleming");
@@ -169,6 +170,21 @@ static int m88e1111_config_init(struct phy_device *phydev)
                        return err;
        }
 
+       if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
+               int temp;
+
+               temp = phy_read(phydev, MII_M1111_PHY_EXT_SR);
+               if (temp < 0)
+                       return temp;
+
+               temp &= ~(MII_M1111_HWCFG_MODE_MASK);
+               temp |= MII_M1111_HWCFG_MODE_SGMII_NO_CLK;
+
+               err = phy_write(phydev, MII_M1111_PHY_EXT_SR, temp);
+               if (err < 0)
+                       return err;
+       }
+
        err = phy_write(phydev, MII_BMCR, BMCR_RESET);
        if (err < 0)
                return err;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to