diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2005-09-02 18:56:57 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-05 18:06:53 -0400 |
commit | c3d6f1f24cf3fdfdad3bff631349dc2aef06c8df (patch) | |
tree | af58a41345f99a23137b1d0d868787d03b483c99 /drivers/net/sis190.c | |
parent | 6614a6dc6ebba4d3ca0ba5ea023b61a7d22ab00b (diff) |
[PATCH] sis190: RGMII Tx internal delay fiddling
Don't ask.
The patch is based on SiS's GPLed driver.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/sis190.c')
-rw-r--r-- | drivers/net/sis190.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 2f69ba8ef887..61a24a944b87 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c | |||
@@ -273,7 +273,8 @@ enum sis190_eeprom_address { | |||
273 | 273 | ||
274 | enum sis190_feature { | 274 | enum sis190_feature { |
275 | F_HAS_RGMII = 1, | 275 | F_HAS_RGMII = 1, |
276 | F_PHY_88E1111 = 2 | 276 | F_PHY_88E1111 = 2, |
277 | F_PHY_BCM5461 = 4 | ||
277 | }; | 278 | }; |
278 | 279 | ||
279 | struct sis190_private { | 280 | struct sis190_private { |
@@ -321,7 +322,7 @@ static struct mii_chip_info { | |||
321 | unsigned int type; | 322 | unsigned int type; |
322 | u32 feature; | 323 | u32 feature; |
323 | } mii_chip_table[] = { | 324 | } mii_chip_table[] = { |
324 | { "Broadcom PHY BCM5461", { 0x0020, 0x60c0 }, LAN, 0 }, | 325 | { "Broadcom PHY BCM5461", { 0x0020, 0x60c0 }, LAN, F_PHY_BCM5461 }, |
325 | { "Agere PHY ET1101B", { 0x0282, 0xf010 }, LAN, 0 }, | 326 | { "Agere PHY ET1101B", { 0x0282, 0xf010 }, LAN, 0 }, |
326 | { "Marvell PHY 88E1111", { 0x0141, 0x0cc0 }, LAN, F_PHY_88E1111 }, | 327 | { "Marvell PHY 88E1111", { 0x0141, 0x0cc0 }, LAN, F_PHY_88E1111 }, |
327 | { "Realtek PHY RTL8201", { 0x0000, 0x8200 }, LAN, 0 }, | 328 | { "Realtek PHY RTL8201", { 0x0000, 0x8200 }, LAN, 0 }, |
@@ -960,8 +961,22 @@ static void sis190_phy_task(void * data) | |||
960 | 961 | ||
961 | p->ctl |= SIS_R32(StationControl) & ~0x0f001c00; | 962 | p->ctl |= SIS_R32(StationControl) & ~0x0f001c00; |
962 | 963 | ||
964 | if ((tp->features & F_HAS_RGMII) && | ||
965 | (tp->features & F_PHY_BCM5461)) { | ||
966 | // Set Tx Delay in RGMII mode. | ||
967 | mdio_write(ioaddr, phy_id, 0x18, 0xf1c7); | ||
968 | udelay(200); | ||
969 | mdio_write(ioaddr, phy_id, 0x1c, 0x8c00); | ||
970 | p->ctl |= 0x03000000; | ||
971 | } | ||
972 | |||
963 | SIS_W32(StationControl, p->ctl); | 973 | SIS_W32(StationControl, p->ctl); |
964 | 974 | ||
975 | if (tp->features & F_HAS_RGMII) { | ||
976 | SIS_W32(RGDelay, 0x0441); | ||
977 | SIS_W32(RGDelay, 0x0440); | ||
978 | } | ||
979 | |||
965 | net_link(tp, KERN_INFO "%s: link on %s mode.\n", dev->name, | 980 | net_link(tp, KERN_INFO "%s: link on %s mode.\n", dev->name, |
966 | p->msg); | 981 | p->msg); |
967 | netif_carrier_on(dev); | 982 | netif_carrier_on(dev); |