Commit 31605c01 authored by Harini Katakam's avatar Harini Katakam Committed by Jakub Kicinski

phy: mscc: Use PHY_ID_MATCH_VENDOR to minimize PHY ID table

All the PHY devices variants specified have the same mask and
hence can be simplified to one vendor look up for 0x00070400.
Any individual config can be identified by PHY_ID_MATCH_EXACT
in the respective structure.
Signed-off-by: default avatarHarini Katakam <harini.katakam@amd.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 748b4428
...@@ -292,6 +292,7 @@ enum rgmii_clock_delay { ...@@ -292,6 +292,7 @@ enum rgmii_clock_delay {
#define PHY_ID_VSC8575 0x000707d0 #define PHY_ID_VSC8575 0x000707d0
#define PHY_ID_VSC8582 0x000707b0 #define PHY_ID_VSC8582 0x000707b0
#define PHY_ID_VSC8584 0x000707c0 #define PHY_ID_VSC8584 0x000707c0
#define PHY_VENDOR_MSCC 0x00070400
#define MSCC_VDDMAC_1500 1500 #define MSCC_VDDMAC_1500 1500
#define MSCC_VDDMAC_1800 1800 #define MSCC_VDDMAC_1800 1800
......
...@@ -2678,21 +2678,7 @@ static struct phy_driver vsc85xx_driver[] = { ...@@ -2678,21 +2678,7 @@ static struct phy_driver vsc85xx_driver[] = {
module_phy_driver(vsc85xx_driver); module_phy_driver(vsc85xx_driver);
static struct mdio_device_id __maybe_unused vsc85xx_tbl[] = { static struct mdio_device_id __maybe_unused vsc85xx_tbl[] = {
{ PHY_ID_VSC8501, 0xfffffff0, }, { PHY_ID_MATCH_VENDOR(PHY_VENDOR_MSCC) },
{ PHY_ID_VSC8502, 0xfffffff0, },
{ PHY_ID_VSC8504, 0xfffffff0, },
{ PHY_ID_VSC8514, 0xfffffff0, },
{ PHY_ID_VSC8530, 0xfffffff0, },
{ PHY_ID_VSC8531, 0xfffffff0, },
{ PHY_ID_VSC8540, 0xfffffff0, },
{ PHY_ID_VSC8541, 0xfffffff0, },
{ PHY_ID_VSC8552, 0xfffffff0, },
{ PHY_ID_VSC856X, 0xfffffff0, },
{ PHY_ID_VSC8572, 0xfffffff0, },
{ PHY_ID_VSC8574, 0xfffffff0, },
{ PHY_ID_VSC8575, 0xfffffff0, },
{ PHY_ID_VSC8582, 0xfffffff0, },
{ PHY_ID_VSC8584, 0xfffffff0, },
{ } { }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment