Skip to content

Commit

Permalink
broadcom: Add BCM50610M support
Browse files Browse the repository at this point in the history
This patch adds support for the BCM50610M phy ID.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Matt Carlson authored and David S. Miller committed Aug 26, 2009
1 parent 7f97a4b commit 4f4598f
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions drivers/net/phy/broadcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/phy.h>

#define PHY_ID_BCM50610 0x0143bd60
#define PHY_ID_BCM50610M 0x0143bd70

#define MII_BCM54XX_ECR 0x10 /* BCM54xx extended control register */
#define MII_BCM54XX_ECR_IM 0x1000 /* Interrupt mask */
Expand Down Expand Up @@ -447,7 +448,7 @@ static struct phy_driver bcm5411_driver = {
.read_status = genphy_read_status,
.ack_interrupt = bcm54xx_ack_interrupt,
.config_intr = bcm54xx_config_intr,
.driver = { .owner = THIS_MODULE },
.driver = { .owner = THIS_MODULE },
};

static struct phy_driver bcm5421_driver = {
Expand All @@ -462,7 +463,7 @@ static struct phy_driver bcm5421_driver = {
.read_status = genphy_read_status,
.ack_interrupt = bcm54xx_ack_interrupt,
.config_intr = bcm54xx_config_intr,
.driver = { .owner = THIS_MODULE },
.driver = { .owner = THIS_MODULE },
};

static struct phy_driver bcm5461_driver = {
Expand All @@ -477,7 +478,7 @@ static struct phy_driver bcm5461_driver = {
.read_status = genphy_read_status,
.ack_interrupt = bcm54xx_ack_interrupt,
.config_intr = bcm54xx_config_intr,
.driver = { .owner = THIS_MODULE },
.driver = { .owner = THIS_MODULE },
};

static struct phy_driver bcm5464_driver = {
Expand All @@ -492,7 +493,7 @@ static struct phy_driver bcm5464_driver = {
.read_status = genphy_read_status,
.ack_interrupt = bcm54xx_ack_interrupt,
.config_intr = bcm54xx_config_intr,
.driver = { .owner = THIS_MODULE },
.driver = { .owner = THIS_MODULE },
};

static struct phy_driver bcm5481_driver = {
Expand All @@ -507,7 +508,7 @@ static struct phy_driver bcm5481_driver = {
.read_status = genphy_read_status,
.ack_interrupt = bcm54xx_ack_interrupt,
.config_intr = bcm54xx_config_intr,
.driver = { .owner = THIS_MODULE },
.driver = { .owner = THIS_MODULE },
};

static struct phy_driver bcm5482_driver = {
Expand All @@ -522,7 +523,7 @@ static struct phy_driver bcm5482_driver = {
.read_status = bcm5482_read_status,
.ack_interrupt = bcm54xx_ack_interrupt,
.config_intr = bcm54xx_config_intr,
.driver = { .owner = THIS_MODULE },
.driver = { .owner = THIS_MODULE },
};

static struct phy_driver bcm50610_driver = {
Expand All @@ -537,7 +538,22 @@ static struct phy_driver bcm50610_driver = {
.read_status = genphy_read_status,
.ack_interrupt = bcm54xx_ack_interrupt,
.config_intr = bcm54xx_config_intr,
.driver = { .owner = THIS_MODULE },
.driver = { .owner = THIS_MODULE },
};

static struct phy_driver bcm50610m_driver = {
.phy_id = PHY_ID_BCM50610M,
.phy_id_mask = 0xfffffff0,
.name = "Broadcom BCM50610M",
.features = PHY_GBIT_FEATURES |
SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
.config_init = bcm54xx_config_init,
.config_aneg = genphy_config_aneg,
.read_status = genphy_read_status,
.ack_interrupt = bcm54xx_ack_interrupt,
.config_intr = bcm54xx_config_intr,
.driver = { .owner = THIS_MODULE },
};

static struct phy_driver bcm57780_driver = {
Expand All @@ -552,7 +568,7 @@ static struct phy_driver bcm57780_driver = {
.read_status = genphy_read_status,
.ack_interrupt = bcm54xx_ack_interrupt,
.config_intr = bcm54xx_config_intr,
.driver = { .owner = THIS_MODULE },
.driver = { .owner = THIS_MODULE },
};

static int __init broadcom_init(void)
Expand Down Expand Up @@ -580,12 +596,17 @@ static int __init broadcom_init(void)
ret = phy_driver_register(&bcm50610_driver);
if (ret)
goto out_50610;
ret = phy_driver_register(&bcm50610m_driver);
if (ret)
goto out_50610m;
ret = phy_driver_register(&bcm57780_driver);
if (ret)
goto out_57780;
return ret;

out_57780:
phy_driver_unregister(&bcm50610m_driver);
out_50610m:
phy_driver_unregister(&bcm50610_driver);
out_50610:
phy_driver_unregister(&bcm5482_driver);
Expand All @@ -606,6 +627,7 @@ static int __init broadcom_init(void)
static void __exit broadcom_exit(void)
{
phy_driver_unregister(&bcm57780_driver);
phy_driver_unregister(&bcm50610m_driver);
phy_driver_unregister(&bcm50610_driver);
phy_driver_unregister(&bcm5482_driver);
phy_driver_unregister(&bcm5481_driver);
Expand Down

0 comments on commit 4f4598f

Please sign in to comment.