diff options
author | Stefan Roese <sr@denx.de> | 2007-12-04 19:14:25 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-12-07 15:09:05 -0500 |
commit | f1f304f2e8fbc6ca80d5ef90132bd0772048f0ef (patch) | |
tree | 6e60e37fb29f71c7d88e1ac9a736ac2e7b6eaee3 /drivers/net | |
parent | abf9b902059fb1d569b64e8645a76f0fccbdbbe5 (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ibm_newemac/phy.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/net/ibm_newemac/phy.c b/drivers/net/ibm_newemac/phy.c index aa1f0ddf1e3e..a5e89c55abd5 100644 --- a/drivers/net/ibm_newemac/phy.c +++ b/drivers/net/ibm_newemac/phy.c | |||
@@ -306,8 +306,47 @@ static struct mii_phy_def cis8201_phy_def = { | |||
306 | .ops = &cis8201_phy_ops | 306 | .ops = &cis8201_phy_ops |
307 | }; | 307 | }; |
308 | 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 | |||
309 | static struct mii_phy_def *mii_phy_table[] = { | 346 | static struct mii_phy_def *mii_phy_table[] = { |
310 | &cis8201_phy_def, | 347 | &cis8201_phy_def, |
348 | &bcm5248_phy_def, | ||
349 | &m88e1111_phy_def, | ||
311 | &genmii_phy_def, | 350 | &genmii_phy_def, |
312 | NULL | 351 | NULL |
313 | }; | 352 | }; |