Merge branch 'bcm7xxx'

Florian Fainelli says:

====================
Broadcom BCM7xxx PHY updates for new entries

Another week, another set of updates for the Broadcom BCM7xxx PHY driver.  This
patch set cleanups the existing definitions, adds a macro to ease the addition
of future chips, and finally add two new SoCs to the list of supported chips.

Resending since the first patch did not make it to the list, sorry about that.

Changes in v2:
- rephrased commit message for patch 1 to make it pass majordomo
  capital triple X was rejected
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2014-08-27 23:16:19 -07:00
commit 900405d014
2 changed files with 26 additions and 38 deletions

View File

@ -319,44 +319,28 @@ static int bcm7xxx_dummy_config_init(struct phy_device *phydev)
return 0; return 0;
} }
#define BCM7XXX_28NM_GPHY(_oui, _name) \
{ \
.phy_id = (_oui), \
.phy_id_mask = 0xfffffff0, \
.name = _name, \
.features = PHY_GBIT_FEATURES | \
SUPPORTED_Pause | SUPPORTED_Asym_Pause, \
.flags = PHY_IS_INTERNAL, \
.config_init = bcm7xxx_28nm_afe_config_init, \
.config_aneg = genphy_config_aneg, \
.read_status = genphy_read_status, \
.resume = bcm7xxx_28nm_resume, \
.driver = { .owner = THIS_MODULE }, \
}
static struct phy_driver bcm7xxx_driver[] = { static struct phy_driver bcm7xxx_driver[] = {
BCM7XXX_28NM_GPHY(PHY_ID_BCM7250, "Broadcom BCM7250"),
BCM7XXX_28NM_GPHY(PHY_ID_BCM7364, "Broadcom BCM7364"),
BCM7XXX_28NM_GPHY(PHY_ID_BCM7366, "Broadcom BCM7366"),
BCM7XXX_28NM_GPHY(PHY_ID_BCM7439, "Broadcom BCM7439"),
BCM7XXX_28NM_GPHY(PHY_ID_BCM7445, "Broadcom BCM7445"),
{ {
.phy_id = PHY_ID_BCM7366,
.phy_id_mask = 0xfffffff0,
.name = "Broadcom BCM7366",
.features = PHY_GBIT_FEATURES |
SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_IS_INTERNAL,
.config_init = bcm7xxx_28nm_afe_config_init,
.config_aneg = genphy_config_aneg,
.read_status = genphy_read_status,
.resume = bcm7xxx_28nm_resume,
.driver = { .owner = THIS_MODULE },
}, {
.phy_id = PHY_ID_BCM7439,
.phy_id_mask = 0xfffffff0,
.name = "Broadcom BCM7439",
.features = PHY_GBIT_FEATURES |
SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_IS_INTERNAL,
.config_init = bcm7xxx_28nm_afe_config_init,
.config_aneg = genphy_config_aneg,
.read_status = genphy_read_status,
.resume = bcm7xxx_28nm_resume,
.driver = { .owner = THIS_MODULE },
}, {
.phy_id = PHY_ID_BCM7445,
.phy_id_mask = 0xfffffff0,
.name = "Broadcom BCM7445",
.features = PHY_GBIT_FEATURES |
SUPPORTED_Pause | SUPPORTED_Asym_Pause,
.flags = PHY_IS_INTERNAL,
.config_init = bcm7xxx_28nm_config_init,
.config_aneg = genphy_config_aneg,
.read_status = genphy_read_status,
.resume = bcm7xxx_28nm_afe_config_init,
.driver = { .owner = THIS_MODULE },
}, {
.phy_id = PHY_BCM_OUI_4, .phy_id = PHY_BCM_OUI_4,
.phy_id_mask = 0xffff0000, .phy_id_mask = 0xffff0000,
.name = "Broadcom BCM7XXX 40nm", .name = "Broadcom BCM7XXX 40nm",
@ -385,6 +369,8 @@ static struct phy_driver bcm7xxx_driver[] = {
} }; } };
static struct mdio_device_id __maybe_unused bcm7xxx_tbl[] = { static struct mdio_device_id __maybe_unused bcm7xxx_tbl[] = {
{ PHY_ID_BCM7250, 0xfffffff0, },
{ PHY_ID_BCM7364, 0xfffffff0, },
{ PHY_ID_BCM7366, 0xfffffff0, }, { PHY_ID_BCM7366, 0xfffffff0, },
{ PHY_ID_BCM7439, 0xfffffff0, }, { PHY_ID_BCM7439, 0xfffffff0, },
{ PHY_ID_BCM7445, 0xfffffff0, }, { PHY_ID_BCM7445, 0xfffffff0, },

View File

@ -13,6 +13,8 @@
#define PHY_ID_BCM5461 0x002060c0 #define PHY_ID_BCM5461 0x002060c0
#define PHY_ID_BCM57780 0x03625d90 #define PHY_ID_BCM57780 0x03625d90
#define PHY_ID_BCM7250 0xae025280
#define PHY_ID_BCM7364 0xae025260
#define PHY_ID_BCM7366 0x600d8490 #define PHY_ID_BCM7366 0x600d8490
#define PHY_ID_BCM7439 0x600d8480 #define PHY_ID_BCM7439 0x600d8480
#define PHY_ID_BCM7445 0x600d8510 #define PHY_ID_BCM7445 0x600d8510
@ -21,9 +23,9 @@
#define PHY_BCM_OUI_1 0x00206000 #define PHY_BCM_OUI_1 0x00206000
#define PHY_BCM_OUI_2 0x0143bc00 #define PHY_BCM_OUI_2 0x0143bc00
#define PHY_BCM_OUI_3 0x03625c00 #define PHY_BCM_OUI_3 0x03625c00
#define PHY_BCM_OUI_4 0x600d0000 #define PHY_BCM_OUI_4 0x600d8400
#define PHY_BCM_OUI_5 0x03625e00 #define PHY_BCM_OUI_5 0x03625e00
#define PHY_BCM_OUI_6 0xae025000
#define PHY_BCM_FLAGS_MODE_COPPER 0x00000001 #define PHY_BCM_FLAGS_MODE_COPPER 0x00000001
#define PHY_BCM_FLAGS_MODE_1000BX 0x00000002 #define PHY_BCM_FLAGS_MODE_1000BX 0x00000002