summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/realtek.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/realtek.c b/cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/realtek.c
index 76a4c9d2d1..cc2252a04c 100644
--- a/cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/realtek.c
+++ b/cleopatre/linux-2.6.25.10-spc300/drivers/net/phy/realtek.c
@@ -48,6 +48,40 @@ static int rtl821x_config_intr(struct phy_device *phydev)
return err;
}
+static void rtl821x_disable_eee(struct phy_device *phydev)
+{
+ /* Select Page5. */
+ phy_write(phydev, 31, 0x0005);
+ /* Set reg #5. */
+ phy_write(phydev, 5, 0x8b85);
+ /* For RTL8211E. */
+ phy_write(phydev, 6, 0x0ae2);
+ /* Select Page7. */
+ phy_write(phydev, 31, 0x0007);
+ /* Set reg #30. */
+ phy_write(phydev, 30, 0x0020);
+ /* For RTL8211E. */
+ phy_write(phydev, 21, 0x1008);
+ /* Select Page 0. */
+ phy_write(phydev, 31, 0x0000);
+ /* Set address mode and MMD Device=7. */
+ phy_write(phydev, 13, 0x0007);
+ /* Set address value. */
+ phy_write(phydev, 14, 0x003c);
+ /* Set data mode and MMD Device=7. */
+ phy_write(phydev, 13, 0x4007);
+ /* Set data. */
+ phy_write(phydev, 14, 0x0000);
+}
+
+static int rtl821x_config_init(struct phy_device *phydev)
+{
+ /* Disable EEE. */
+ rtl821x_disable_eee(phydev);
+
+ return 0;
+}
+
/* RTL8211B */
static struct phy_driver rtl821x_driver = {
.phy_id = 0x001cc912,
@@ -56,6 +90,7 @@ static struct phy_driver rtl821x_driver = {
.features = PHY_GBIT_FEATURES,
.flags = PHY_HAS_INTERRUPT,
.config_aneg = &genphy_config_aneg,
+ .config_init = &rtl821x_config_init,
.read_status = &genphy_read_status,
.ack_interrupt = &rtl821x_ack_interrupt,
.config_intr = &rtl821x_config_intr,