aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_newemac
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2007-12-04 19:14:26 -0500
committerJeff Garzik <jeff@garzik.org>2007-12-07 15:09:05 -0500
commit8df4538e21f7313a29fa6c5af78c08a135d44738 (patch)
treefd0df48f20071c345027bc7ea7d28eb84617df8d /drivers/net/ibm_newemac
parentf1f304f2e8fbc6ca80d5ef90132bd0772048f0ef (diff)
ibm_newemac: Add ET1011c PHY support
This adds support for the Agere ET1011c PHY as found on the AMCC Taishan board. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ibm_newemac')
-rw-r--r--drivers/net/ibm_newemac/phy.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/net/ibm_newemac/phy.c b/drivers/net/ibm_newemac/phy.c
index a5e89c55abd5..9308fad76d57 100644
--- a/drivers/net/ibm_newemac/phy.c
+++ b/drivers/net/ibm_newemac/phy.c
@@ -327,6 +327,42 @@ static int m88e1111_init(struct mii_phy *phy)
327 return 0; 327 return 0;
328} 328}
329 329
330static int et1011c_init(struct mii_phy *phy)
331{
332 u16 reg_short;
333
334 reg_short = (u16)(phy_read(phy, 0x16));
335 reg_short &= ~(0x7);
336 reg_short |= 0x6; /* RGMII Trace Delay*/
337 phy_write(phy, 0x16, reg_short);
338
339 reg_short = (u16)(phy_read(phy, 0x17));
340 reg_short &= ~(0x40);
341 phy_write(phy, 0x17, reg_short);
342
343 phy_write(phy, 0x1c, 0x74f0);
344 return 0;
345}
346
347static struct mii_phy_ops et1011c_phy_ops = {
348 .init = et1011c_init,
349 .setup_aneg = genmii_setup_aneg,
350 .setup_forced = genmii_setup_forced,
351 .poll_link = genmii_poll_link,
352 .read_link = genmii_read_link
353};
354
355static struct mii_phy_def et1011c_phy_def = {
356 .phy_id = 0x0282f000,
357 .phy_id_mask = 0x0fffff00,
358 .name = "ET1011C Gigabit Ethernet",
359 .ops = &et1011c_phy_ops
360};
361
362
363
364
365
330static struct mii_phy_ops m88e1111_phy_ops = { 366static struct mii_phy_ops m88e1111_phy_ops = {
331 .init = m88e1111_init, 367 .init = m88e1111_init,
332 .setup_aneg = genmii_setup_aneg, 368 .setup_aneg = genmii_setup_aneg,
@@ -344,6 +380,7 @@ static struct mii_phy_def m88e1111_phy_def = {
344}; 380};
345 381
346static struct mii_phy_def *mii_phy_table[] = { 382static struct mii_phy_def *mii_phy_table[] = {
383 &et1011c_phy_def,
347 &cis8201_phy_def, 384 &cis8201_phy_def,
348 &bcm5248_phy_def, 385 &bcm5248_phy_def,
349 &m88e1111_phy_def, 386 &m88e1111_phy_def,