diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-05-24 04:22:21 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-05-24 04:22:21 -0400 |
commit | 66643de455c27973ac31ad6de9f859d399916842 (patch) | |
tree | 7ebed7f051879007d4b11d6aaa9e65a1bcb0b08f /drivers/net/sungem_phy.c | |
parent | 2c23d62abb820e19c54012520f08a198c2233a85 (diff) | |
parent | 387e2b0439026aa738a9edca15a57e5c0bcb4dfc (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
include/asm-powerpc/unistd.h
include/asm-sparc/unistd.h
include/asm-sparc64/unistd.h
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/net/sungem_phy.c')
-rw-r--r-- | drivers/net/sungem_phy.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c index 046371ee5bbe..b2ddd5e79303 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c | |||
@@ -329,6 +329,30 @@ static int bcm5421_init(struct mii_phy* phy) | |||
329 | return 0; | 329 | return 0; |
330 | } | 330 | } |
331 | 331 | ||
332 | static int bcm5421_enable_fiber(struct mii_phy* phy) | ||
333 | { | ||
334 | /* enable fiber mode */ | ||
335 | phy_write(phy, MII_NCONFIG, 0x9020); | ||
336 | /* LEDs active in both modes, autosense prio = fiber */ | ||
337 | phy_write(phy, MII_NCONFIG, 0x945f); | ||
338 | |||
339 | /* switch off fibre autoneg */ | ||
340 | phy_write(phy, MII_NCONFIG, 0xfc01); | ||
341 | phy_write(phy, 0x0b, 0x0004); | ||
342 | |||
343 | return 0; | ||
344 | } | ||
345 | |||
346 | static int bcm5461_enable_fiber(struct mii_phy* phy) | ||
347 | { | ||
348 | phy_write(phy, MII_NCONFIG, 0xfc0c); | ||
349 | phy_write(phy, MII_BMCR, 0x4140); | ||
350 | phy_write(phy, MII_NCONFIG, 0xfc0b); | ||
351 | phy_write(phy, MII_BMCR, 0x0140); | ||
352 | |||
353 | return 0; | ||
354 | } | ||
355 | |||
332 | static int bcm54xx_setup_aneg(struct mii_phy *phy, u32 advertise) | 356 | static int bcm54xx_setup_aneg(struct mii_phy *phy, u32 advertise) |
333 | { | 357 | { |
334 | u16 ctl, adv; | 358 | u16 ctl, adv; |
@@ -762,6 +786,7 @@ static struct mii_phy_ops bcm5421_phy_ops = { | |||
762 | .setup_forced = bcm54xx_setup_forced, | 786 | .setup_forced = bcm54xx_setup_forced, |
763 | .poll_link = genmii_poll_link, | 787 | .poll_link = genmii_poll_link, |
764 | .read_link = bcm54xx_read_link, | 788 | .read_link = bcm54xx_read_link, |
789 | .enable_fiber = bcm5421_enable_fiber, | ||
765 | }; | 790 | }; |
766 | 791 | ||
767 | static struct mii_phy_def bcm5421_phy_def = { | 792 | static struct mii_phy_def bcm5421_phy_def = { |
@@ -792,6 +817,25 @@ static struct mii_phy_def bcm5421k2_phy_def = { | |||
792 | .ops = &bcm5421k2_phy_ops | 817 | .ops = &bcm5421k2_phy_ops |
793 | }; | 818 | }; |
794 | 819 | ||
820 | static struct mii_phy_ops bcm5461_phy_ops = { | ||
821 | .init = bcm5421_init, | ||
822 | .suspend = generic_suspend, | ||
823 | .setup_aneg = bcm54xx_setup_aneg, | ||
824 | .setup_forced = bcm54xx_setup_forced, | ||
825 | .poll_link = genmii_poll_link, | ||
826 | .read_link = bcm54xx_read_link, | ||
827 | .enable_fiber = bcm5461_enable_fiber, | ||
828 | }; | ||
829 | |||
830 | static struct mii_phy_def bcm5461_phy_def = { | ||
831 | .phy_id = 0x002060c0, | ||
832 | .phy_id_mask = 0xfffffff0, | ||
833 | .name = "BCM5461", | ||
834 | .features = MII_GBIT_FEATURES, | ||
835 | .magic_aneg = 1, | ||
836 | .ops = &bcm5461_phy_ops | ||
837 | }; | ||
838 | |||
795 | /* Broadcom BCM 5462 built-in Vesta */ | 839 | /* Broadcom BCM 5462 built-in Vesta */ |
796 | static struct mii_phy_ops bcm5462V_phy_ops = { | 840 | static struct mii_phy_ops bcm5462V_phy_ops = { |
797 | .init = bcm5421_init, | 841 | .init = bcm5421_init, |
@@ -857,6 +901,7 @@ static struct mii_phy_def* mii_phy_table[] = { | |||
857 | &bcm5411_phy_def, | 901 | &bcm5411_phy_def, |
858 | &bcm5421_phy_def, | 902 | &bcm5421_phy_def, |
859 | &bcm5421k2_phy_def, | 903 | &bcm5421k2_phy_def, |
904 | &bcm5461_phy_def, | ||
860 | &bcm5462V_phy_def, | 905 | &bcm5462V_phy_def, |
861 | &marvell_phy_def, | 906 | &marvell_phy_def, |
862 | &genmii_phy_def, | 907 | &genmii_phy_def, |