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>

authored by Stefan Roese and committed by Jeff Garzik 8df4538e f1f304f2

+37
+37
drivers/net/ibm_newemac/phy.c
··· 327 return 0; 328 } 329 330 static struct mii_phy_ops m88e1111_phy_ops = { 331 .init = m88e1111_init, 332 .setup_aneg = genmii_setup_aneg, ··· 380 }; 381 382 static struct mii_phy_def *mii_phy_table[] = { 383 &cis8201_phy_def, 384 &bcm5248_phy_def, 385 &m88e1111_phy_def,
··· 327 return 0; 328 } 329 330 + static 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 + 347 + static 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 + 355 + static 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 + 366 static struct mii_phy_ops m88e1111_phy_ops = { 367 .init = m88e1111_init, 368 .setup_aneg = genmii_setup_aneg, ··· 344 }; 345 346 static struct mii_phy_def *mii_phy_table[] = { 347 + &et1011c_phy_def, 348 &cis8201_phy_def, 349 &bcm5248_phy_def, 350 &m88e1111_phy_def,