diff options
Diffstat (limited to 'drivers/net/phy/broadcom.c')
-rw-r--r-- | drivers/net/phy/broadcom.c | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index cecdbbd549ec..4accd83d3dfe 100644 --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c | |||
@@ -685,7 +685,7 @@ static int brcm_fet_config_intr(struct phy_device *phydev) | |||
685 | } | 685 | } |
686 | 686 | ||
687 | static struct phy_driver bcm5411_driver = { | 687 | static struct phy_driver bcm5411_driver = { |
688 | .phy_id = 0x00206070, | 688 | .phy_id = PHY_ID_BCM5411, |
689 | .phy_id_mask = 0xfffffff0, | 689 | .phy_id_mask = 0xfffffff0, |
690 | .name = "Broadcom BCM5411", | 690 | .name = "Broadcom BCM5411", |
691 | .features = PHY_GBIT_FEATURES | | 691 | .features = PHY_GBIT_FEATURES | |
@@ -700,7 +700,7 @@ static struct phy_driver bcm5411_driver = { | |||
700 | }; | 700 | }; |
701 | 701 | ||
702 | static struct phy_driver bcm5421_driver = { | 702 | static struct phy_driver bcm5421_driver = { |
703 | .phy_id = 0x002060e0, | 703 | .phy_id = PHY_ID_BCM5421, |
704 | .phy_id_mask = 0xfffffff0, | 704 | .phy_id_mask = 0xfffffff0, |
705 | .name = "Broadcom BCM5421", | 705 | .name = "Broadcom BCM5421", |
706 | .features = PHY_GBIT_FEATURES | | 706 | .features = PHY_GBIT_FEATURES | |
@@ -715,7 +715,7 @@ static struct phy_driver bcm5421_driver = { | |||
715 | }; | 715 | }; |
716 | 716 | ||
717 | static struct phy_driver bcm5461_driver = { | 717 | static struct phy_driver bcm5461_driver = { |
718 | .phy_id = 0x002060c0, | 718 | .phy_id = PHY_ID_BCM5461, |
719 | .phy_id_mask = 0xfffffff0, | 719 | .phy_id_mask = 0xfffffff0, |
720 | .name = "Broadcom BCM5461", | 720 | .name = "Broadcom BCM5461", |
721 | .features = PHY_GBIT_FEATURES | | 721 | .features = PHY_GBIT_FEATURES | |
@@ -730,7 +730,7 @@ static struct phy_driver bcm5461_driver = { | |||
730 | }; | 730 | }; |
731 | 731 | ||
732 | static struct phy_driver bcm5464_driver = { | 732 | static struct phy_driver bcm5464_driver = { |
733 | .phy_id = 0x002060b0, | 733 | .phy_id = PHY_ID_BCM5464, |
734 | .phy_id_mask = 0xfffffff0, | 734 | .phy_id_mask = 0xfffffff0, |
735 | .name = "Broadcom BCM5464", | 735 | .name = "Broadcom BCM5464", |
736 | .features = PHY_GBIT_FEATURES | | 736 | .features = PHY_GBIT_FEATURES | |
@@ -745,7 +745,7 @@ static struct phy_driver bcm5464_driver = { | |||
745 | }; | 745 | }; |
746 | 746 | ||
747 | static struct phy_driver bcm5481_driver = { | 747 | static struct phy_driver bcm5481_driver = { |
748 | .phy_id = 0x0143bca0, | 748 | .phy_id = PHY_ID_BCM5481, |
749 | .phy_id_mask = 0xfffffff0, | 749 | .phy_id_mask = 0xfffffff0, |
750 | .name = "Broadcom BCM5481", | 750 | .name = "Broadcom BCM5481", |
751 | .features = PHY_GBIT_FEATURES | | 751 | .features = PHY_GBIT_FEATURES | |
@@ -760,7 +760,7 @@ static struct phy_driver bcm5481_driver = { | |||
760 | }; | 760 | }; |
761 | 761 | ||
762 | static struct phy_driver bcm5482_driver = { | 762 | static struct phy_driver bcm5482_driver = { |
763 | .phy_id = 0x0143bcb0, | 763 | .phy_id = PHY_ID_BCM5482, |
764 | .phy_id_mask = 0xfffffff0, | 764 | .phy_id_mask = 0xfffffff0, |
765 | .name = "Broadcom BCM5482", | 765 | .name = "Broadcom BCM5482", |
766 | .features = PHY_GBIT_FEATURES | | 766 | .features = PHY_GBIT_FEATURES | |
@@ -834,6 +834,21 @@ static struct phy_driver bcmac131_driver = { | |||
834 | .driver = { .owner = THIS_MODULE }, | 834 | .driver = { .owner = THIS_MODULE }, |
835 | }; | 835 | }; |
836 | 836 | ||
837 | static struct phy_driver bcm5241_driver = { | ||
838 | .phy_id = PHY_ID_BCM5241, | ||
839 | .phy_id_mask = 0xfffffff0, | ||
840 | .name = "Broadcom BCM5241", | ||
841 | .features = PHY_BASIC_FEATURES | | ||
842 | SUPPORTED_Pause | SUPPORTED_Asym_Pause, | ||
843 | .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, | ||
844 | .config_init = brcm_fet_config_init, | ||
845 | .config_aneg = genphy_config_aneg, | ||
846 | .read_status = genphy_read_status, | ||
847 | .ack_interrupt = brcm_fet_ack_interrupt, | ||
848 | .config_intr = brcm_fet_config_intr, | ||
849 | .driver = { .owner = THIS_MODULE }, | ||
850 | }; | ||
851 | |||
837 | static int __init broadcom_init(void) | 852 | static int __init broadcom_init(void) |
838 | { | 853 | { |
839 | int ret; | 854 | int ret; |
@@ -868,8 +883,13 @@ static int __init broadcom_init(void) | |||
868 | ret = phy_driver_register(&bcmac131_driver); | 883 | ret = phy_driver_register(&bcmac131_driver); |
869 | if (ret) | 884 | if (ret) |
870 | goto out_ac131; | 885 | goto out_ac131; |
886 | ret = phy_driver_register(&bcm5241_driver); | ||
887 | if (ret) | ||
888 | goto out_5241; | ||
871 | return ret; | 889 | return ret; |
872 | 890 | ||
891 | out_5241: | ||
892 | phy_driver_unregister(&bcmac131_driver); | ||
873 | out_ac131: | 893 | out_ac131: |
874 | phy_driver_unregister(&bcm57780_driver); | 894 | phy_driver_unregister(&bcm57780_driver); |
875 | out_57780: | 895 | out_57780: |
@@ -894,6 +914,7 @@ out_5411: | |||
894 | 914 | ||
895 | static void __exit broadcom_exit(void) | 915 | static void __exit broadcom_exit(void) |
896 | { | 916 | { |
917 | phy_driver_unregister(&bcm5241_driver); | ||
897 | phy_driver_unregister(&bcmac131_driver); | 918 | phy_driver_unregister(&bcmac131_driver); |
898 | phy_driver_unregister(&bcm57780_driver); | 919 | phy_driver_unregister(&bcm57780_driver); |
899 | phy_driver_unregister(&bcm50610m_driver); | 920 | phy_driver_unregister(&bcm50610m_driver); |
@@ -910,16 +931,17 @@ module_init(broadcom_init); | |||
910 | module_exit(broadcom_exit); | 931 | module_exit(broadcom_exit); |
911 | 932 | ||
912 | static struct mdio_device_id broadcom_tbl[] = { | 933 | static struct mdio_device_id broadcom_tbl[] = { |
913 | { 0x00206070, 0xfffffff0 }, | 934 | { PHY_ID_BCM5411, 0xfffffff0 }, |
914 | { 0x002060e0, 0xfffffff0 }, | 935 | { PHY_ID_BCM5421, 0xfffffff0 }, |
915 | { 0x002060c0, 0xfffffff0 }, | 936 | { PHY_ID_BCM5461, 0xfffffff0 }, |
916 | { 0x002060b0, 0xfffffff0 }, | 937 | { PHY_ID_BCM5464, 0xfffffff0 }, |
917 | { 0x0143bca0, 0xfffffff0 }, | 938 | { PHY_ID_BCM5482, 0xfffffff0 }, |
918 | { 0x0143bcb0, 0xfffffff0 }, | 939 | { PHY_ID_BCM5482, 0xfffffff0 }, |
919 | { PHY_ID_BCM50610, 0xfffffff0 }, | 940 | { PHY_ID_BCM50610, 0xfffffff0 }, |
920 | { PHY_ID_BCM50610M, 0xfffffff0 }, | 941 | { PHY_ID_BCM50610M, 0xfffffff0 }, |
921 | { PHY_ID_BCM57780, 0xfffffff0 }, | 942 | { PHY_ID_BCM57780, 0xfffffff0 }, |
922 | { PHY_ID_BCMAC131, 0xfffffff0 }, | 943 | { PHY_ID_BCMAC131, 0xfffffff0 }, |
944 | { PHY_ID_BCM5241, 0xfffffff0 }, | ||
923 | { } | 945 | { } |
924 | }; | 946 | }; |
925 | 947 | ||