aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2007-08-17 12:26:35 -0400
committerFrancois Romieu <romieu@fr.zoreil.com>2007-10-18 15:26:03 -0400
commita441d7b6bf3386c5b384685151a1cea921658819 (patch)
tree7cb3678f67b19d429afd6d8e1817c7860c38d9ee /drivers
parent867763c113494106574a64dc81175d66741a01cb (diff)
r8169: phy init cleanup
Consistent use of hexadecimal. No change of behavior otherwise. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/r8169.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index cb7bb7f3c784..3680ee7ccb0d 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1215,9 +1215,9 @@ static void rtl8169s_hw_phy_config(void __iomem *ioaddr)
1215 }, *p = phy_magic; 1215 }, *p = phy_magic;
1216 unsigned int i; 1216 unsigned int i;
1217 1217
1218 mdio_write(ioaddr, 31, 0x0001); //w 31 2 0 1 1218 mdio_write(ioaddr, 0x1f, 0x0001); //w 31 2 0 1
1219 mdio_write(ioaddr, 21, 0x1000); //w 21 15 0 1000 1219 mdio_write(ioaddr, 0x15, 0x1000); //w 21 15 0 1000
1220 mdio_write(ioaddr, 24, 0x65c7); //w 24 15 0 65c7 1220 mdio_write(ioaddr, 0x18, 0x65c7); //w 24 15 0 65c7
1221 rtl8169_write_gmii_reg_bit(ioaddr, 4, 11, 0); //w 4 11 11 0 1221 rtl8169_write_gmii_reg_bit(ioaddr, 4, 11, 0); //w 4 11 11 0
1222 1222
1223 for (i = 0; i < ARRAY_SIZE(phy_magic); i++, p++) { 1223 for (i = 0; i < ARRAY_SIZE(phy_magic); i++, p++) {
@@ -1230,14 +1230,18 @@ static void rtl8169s_hw_phy_config(void __iomem *ioaddr)
1230 rtl8169_write_gmii_reg_bit(ioaddr, 4, 11, 1); //w 4 11 11 1 1230 rtl8169_write_gmii_reg_bit(ioaddr, 4, 11, 1); //w 4 11 11 1
1231 rtl8169_write_gmii_reg_bit(ioaddr, 4, 11, 0); //w 4 11 11 0 1231 rtl8169_write_gmii_reg_bit(ioaddr, 4, 11, 0); //w 4 11 11 0
1232 } 1232 }
1233 mdio_write(ioaddr, 31, 0x0000); //w 31 2 0 0 1233 mdio_write(ioaddr, 0x1f, 0x0000); //w 31 2 0 0
1234} 1234}
1235 1235
1236static void rtl8169sb_hw_phy_config(void __iomem *ioaddr) 1236static void rtl8169sb_hw_phy_config(void __iomem *ioaddr)
1237{ 1237{
1238 mdio_write(ioaddr, 31, 0x0002); 1238 struct phy_reg phy_reg_init[] = {
1239 mdio_write(ioaddr, 1, 0x90d0); 1239 { 0x1f, 0x0002 },
1240 mdio_write(ioaddr, 31, 0x0000); 1240 { 0x01, 0x90d0 },
1241 { 0x1f, 0x0000 }
1242 };
1243
1244 rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
1241} 1245}
1242 1246
1243static void rtl8168cp_hw_phy_config(void __iomem *ioaddr) 1247static void rtl8168cp_hw_phy_config(void __iomem *ioaddr)