aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@nxp.com>2016-05-11 16:02:05 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-12 16:55:33 -0400
commitf893a99e7e2125ed7874d69cb309ca40a0bea371 (patch)
tree481669698d4776b5624202b9d85f7e8ffd7f513e /drivers/net/phy
parentda73b4e9538b9be96498241ab3f13eab94181e96 (diff)
phy: micrel: Use MICREL_PHY_ID_MASK definition
Replace the hardcoded mask 0x00fffff0 with MICREL_PHY_ID_MASK for better readability. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/micrel.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 4516c8a4fd82..5a8fefc25157 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -726,7 +726,7 @@ static int kszphy_probe(struct phy_device *phydev)
726static struct phy_driver ksphy_driver[] = { 726static struct phy_driver ksphy_driver[] = {
727{ 727{
728 .phy_id = PHY_ID_KS8737, 728 .phy_id = PHY_ID_KS8737,
729 .phy_id_mask = 0x00fffff0, 729 .phy_id_mask = MICREL_PHY_ID_MASK,
730 .name = "Micrel KS8737", 730 .name = "Micrel KS8737",
731 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause), 731 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
732 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, 732 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
@@ -781,7 +781,7 @@ static struct phy_driver ksphy_driver[] = {
781 .resume = genphy_resume, 781 .resume = genphy_resume,
782}, { 782}, {
783 .phy_id = PHY_ID_KSZ8041, 783 .phy_id = PHY_ID_KSZ8041,
784 .phy_id_mask = 0x00fffff0, 784 .phy_id_mask = MICREL_PHY_ID_MASK,
785 .name = "Micrel KSZ8041", 785 .name = "Micrel KSZ8041",
786 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause 786 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
787 | SUPPORTED_Asym_Pause), 787 | SUPPORTED_Asym_Pause),
@@ -800,7 +800,7 @@ static struct phy_driver ksphy_driver[] = {
800 .resume = genphy_resume, 800 .resume = genphy_resume,
801}, { 801}, {
802 .phy_id = PHY_ID_KSZ8041RNLI, 802 .phy_id = PHY_ID_KSZ8041RNLI,
803 .phy_id_mask = 0x00fffff0, 803 .phy_id_mask = MICREL_PHY_ID_MASK,
804 .name = "Micrel KSZ8041RNLI", 804 .name = "Micrel KSZ8041RNLI",
805 .features = PHY_BASIC_FEATURES | 805 .features = PHY_BASIC_FEATURES |
806 SUPPORTED_Pause | SUPPORTED_Asym_Pause, 806 SUPPORTED_Pause | SUPPORTED_Asym_Pause,
@@ -819,7 +819,7 @@ static struct phy_driver ksphy_driver[] = {
819 .resume = genphy_resume, 819 .resume = genphy_resume,
820}, { 820}, {
821 .phy_id = PHY_ID_KSZ8051, 821 .phy_id = PHY_ID_KSZ8051,
822 .phy_id_mask = 0x00fffff0, 822 .phy_id_mask = MICREL_PHY_ID_MASK,
823 .name = "Micrel KSZ8051", 823 .name = "Micrel KSZ8051",
824 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause 824 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
825 | SUPPORTED_Asym_Pause), 825 | SUPPORTED_Asym_Pause),
@@ -857,7 +857,7 @@ static struct phy_driver ksphy_driver[] = {
857}, { 857}, {
858 .phy_id = PHY_ID_KSZ8081, 858 .phy_id = PHY_ID_KSZ8081,
859 .name = "Micrel KSZ8081 or KSZ8091", 859 .name = "Micrel KSZ8081 or KSZ8091",
860 .phy_id_mask = 0x00fffff0, 860 .phy_id_mask = MICREL_PHY_ID_MASK,
861 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause), 861 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
862 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, 862 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
863 .driver_data = &ksz8081_type, 863 .driver_data = &ksz8081_type,
@@ -875,7 +875,7 @@ static struct phy_driver ksphy_driver[] = {
875}, { 875}, {
876 .phy_id = PHY_ID_KSZ8061, 876 .phy_id = PHY_ID_KSZ8061,
877 .name = "Micrel KSZ8061", 877 .name = "Micrel KSZ8061",
878 .phy_id_mask = 0x00fffff0, 878 .phy_id_mask = MICREL_PHY_ID_MASK,
879 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause), 879 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
880 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, 880 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
881 .config_init = kszphy_config_init, 881 .config_init = kszphy_config_init,
@@ -909,7 +909,7 @@ static struct phy_driver ksphy_driver[] = {
909 .write_mmd_indirect = ksz9021_wr_mmd_phyreg, 909 .write_mmd_indirect = ksz9021_wr_mmd_phyreg,
910}, { 910}, {
911 .phy_id = PHY_ID_KSZ9031, 911 .phy_id = PHY_ID_KSZ9031,
912 .phy_id_mask = 0x00fffff0, 912 .phy_id_mask = MICREL_PHY_ID_MASK,
913 .name = "Micrel KSZ9031 Gigabit PHY", 913 .name = "Micrel KSZ9031 Gigabit PHY",
914 .features = (PHY_GBIT_FEATURES | SUPPORTED_Pause), 914 .features = (PHY_GBIT_FEATURES | SUPPORTED_Pause),
915 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, 915 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
@@ -926,7 +926,7 @@ static struct phy_driver ksphy_driver[] = {
926 .resume = genphy_resume, 926 .resume = genphy_resume,
927}, { 927}, {
928 .phy_id = PHY_ID_KSZ8873MLL, 928 .phy_id = PHY_ID_KSZ8873MLL,
929 .phy_id_mask = 0x00fffff0, 929 .phy_id_mask = MICREL_PHY_ID_MASK,
930 .name = "Micrel KSZ8873MLL Switch", 930 .name = "Micrel KSZ8873MLL Switch",
931 .features = (SUPPORTED_Pause | SUPPORTED_Asym_Pause), 931 .features = (SUPPORTED_Pause | SUPPORTED_Asym_Pause),
932 .flags = PHY_HAS_MAGICANEG, 932 .flags = PHY_HAS_MAGICANEG,
@@ -940,7 +940,7 @@ static struct phy_driver ksphy_driver[] = {
940 .resume = genphy_resume, 940 .resume = genphy_resume,
941}, { 941}, {
942 .phy_id = PHY_ID_KSZ886X, 942 .phy_id = PHY_ID_KSZ886X,
943 .phy_id_mask = 0x00fffff0, 943 .phy_id_mask = MICREL_PHY_ID_MASK,
944 .name = "Micrel KSZ886X Switch", 944 .name = "Micrel KSZ886X Switch",
945 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause), 945 .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
946 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT, 946 .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
@@ -962,17 +962,17 @@ MODULE_LICENSE("GPL");
962 962
963static struct mdio_device_id __maybe_unused micrel_tbl[] = { 963static struct mdio_device_id __maybe_unused micrel_tbl[] = {
964 { PHY_ID_KSZ9021, 0x000ffffe }, 964 { PHY_ID_KSZ9021, 0x000ffffe },
965 { PHY_ID_KSZ9031, 0x00fffff0 }, 965 { PHY_ID_KSZ9031, MICREL_PHY_ID_MASK },
966 { PHY_ID_KSZ8001, 0x00ffffff }, 966 { PHY_ID_KSZ8001, 0x00ffffff },
967 { PHY_ID_KS8737, 0x00fffff0 }, 967 { PHY_ID_KS8737, MICREL_PHY_ID_MASK },
968 { PHY_ID_KSZ8021, 0x00ffffff }, 968 { PHY_ID_KSZ8021, 0x00ffffff },
969 { PHY_ID_KSZ8031, 0x00ffffff }, 969 { PHY_ID_KSZ8031, 0x00ffffff },
970 { PHY_ID_KSZ8041, 0x00fffff0 }, 970 { PHY_ID_KSZ8041, MICREL_PHY_ID_MASK },
971 { PHY_ID_KSZ8051, 0x00fffff0 }, 971 { PHY_ID_KSZ8051, MICREL_PHY_ID_MASK },
972 { PHY_ID_KSZ8061, 0x00fffff0 }, 972 { PHY_ID_KSZ8061, MICREL_PHY_ID_MASK },
973 { PHY_ID_KSZ8081, 0x00fffff0 }, 973 { PHY_ID_KSZ8081, MICREL_PHY_ID_MASK },
974 { PHY_ID_KSZ8873MLL, 0x00fffff0 }, 974 { PHY_ID_KSZ8873MLL, MICREL_PHY_ID_MASK },
975 { PHY_ID_KSZ886X, 0x00fffff0 }, 975 { PHY_ID_KSZ886X, MICREL_PHY_ID_MASK },
976 { } 976 { }
977}; 977};
978 978