ibm_newemac: Add BCM5248 and Marvell 88E1111 PHY support

This patch adds BCM5248 and Marvell 88E1111 PHY support to NEW EMAC driver.
These PHY chips are used on PowerPC 440EPx boards.
The PHY code is based on the previous work by Stefan Roese <sr@denx.de>

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
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 f1f304f2 abf9b902

+39
+39
drivers/net/ibm_newemac/phy.c
··· 306 .ops = &cis8201_phy_ops 307 }; 308 309 static struct mii_phy_def *mii_phy_table[] = { 310 &cis8201_phy_def, 311 &genmii_phy_def, 312 NULL 313 };
··· 306 .ops = &cis8201_phy_ops 307 }; 308 309 + static struct mii_phy_def bcm5248_phy_def = { 310 + 311 + .phy_id = 0x0143bc00, 312 + .phy_id_mask = 0x0ffffff0, 313 + .name = "BCM5248 10/100 SMII Ethernet", 314 + .ops = &generic_phy_ops 315 + }; 316 + 317 + static int m88e1111_init(struct mii_phy *phy) 318 + { 319 + pr_debug("%s: Marvell 88E1111 Ethernet\n", __FUNCTION__); 320 + phy_write(phy, 0x14, 0x0ce3); 321 + phy_write(phy, 0x18, 0x4101); 322 + phy_write(phy, 0x09, 0x0e00); 323 + phy_write(phy, 0x04, 0x01e1); 324 + phy_write(phy, 0x00, 0x9140); 325 + phy_write(phy, 0x00, 0x1140); 326 + 327 + return 0; 328 + } 329 + 330 + static struct mii_phy_ops m88e1111_phy_ops = { 331 + .init = m88e1111_init, 332 + .setup_aneg = genmii_setup_aneg, 333 + .setup_forced = genmii_setup_forced, 334 + .poll_link = genmii_poll_link, 335 + .read_link = genmii_read_link 336 + }; 337 + 338 + static struct mii_phy_def m88e1111_phy_def = { 339 + 340 + .phy_id = 0x01410CC0, 341 + .phy_id_mask = 0x0ffffff0, 342 + .name = "Marvell 88E1111 Ethernet", 343 + .ops = &m88e1111_phy_ops, 344 + }; 345 + 346 static struct mii_phy_def *mii_phy_table[] = { 347 &cis8201_phy_def, 348 + &bcm5248_phy_def, 349 + &m88e1111_phy_def, 350 &genmii_phy_def, 351 NULL 352 };