Skip to content

Commit 7a938f8

Browse files
lumagdavem330
authored andcommitted
broadcom: Add 5241 support
This patch adds the 5241 PHY ID to the broadcom module. Signed-off-by: Dmitry Eremin-Solenikov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent fcb26ec commit 7a938f8

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

drivers/net/phy/broadcom.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,21 @@ static struct phy_driver bcmac131_driver = {
834834
.driver = { .owner = THIS_MODULE },
835835
};
836836

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+
837852
static int __init broadcom_init(void)
838853
{
839854
int ret;
@@ -868,8 +883,13 @@ static int __init broadcom_init(void)
868883
ret = phy_driver_register(&bcmac131_driver);
869884
if (ret)
870885
goto out_ac131;
886+
ret = phy_driver_register(&bcm5241_driver);
887+
if (ret)
888+
goto out_5241;
871889
return ret;
872890

891+
out_5241:
892+
phy_driver_unregister(&bcmac131_driver);
873893
out_ac131:
874894
phy_driver_unregister(&bcm57780_driver);
875895
out_57780:
@@ -894,6 +914,7 @@ static int __init broadcom_init(void)
894914

895915
static void __exit broadcom_exit(void)
896916
{
917+
phy_driver_unregister(&bcm5241_driver);
897918
phy_driver_unregister(&bcmac131_driver);
898919
phy_driver_unregister(&bcm57780_driver);
899920
phy_driver_unregister(&bcm50610m_driver);
@@ -920,6 +941,7 @@ static struct mdio_device_id broadcom_tbl[] = {
920941
{ PHY_ID_BCM50610M, 0xfffffff0 },
921942
{ PHY_ID_BCM57780, 0xfffffff0 },
922943
{ PHY_ID_BCMAC131, 0xfffffff0 },
944+
{ PHY_ID_BCM5241, 0xfffffff0 },
923945
{ }
924946
};
925947

include/linux/brcmphy.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#define PHY_ID_BCM50610 0x0143bd60
22
#define PHY_ID_BCM50610M 0x0143bd70
3+
#define PHY_ID_BCM5241 0x0143bc30
34
#define PHY_ID_BCMAC131 0x0143bc70
45
#define PHY_ID_BCM5481 0x0143bca0
56
#define PHY_ID_BCM5482 0x0143bcb0

0 commit comments

Comments
 (0)