net: phy: micrel: Use defines for PHY_IDs and MASK
authorPhilippe Schenker <philippe.schenker@toradex.com>
Wed, 11 Mar 2020 10:59:22 +0000 (11:59 +0100)
committerStefano Babic <sbabic@denx.de>
Fri, 1 May 2020 11:46:22 +0000 (13:46 +0200)
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
drivers/net/phy/micrel_ksz90x1.c
include/micrel.h

index 0105fc5af1ea3a3fc012b689536617607002b5ed..f83650b8ef686e3bff54909bea13bfc6b4ee8dcd 100644 (file)
@@ -383,8 +383,8 @@ static int ksz9031_config(struct phy_device *phydev)
 
 static struct phy_driver ksz9031_driver = {
        .name = "Micrel ksz9031",
-       .uid  = 0x221620,
-       .mask = 0xfffff0,
+       .uid  = PHY_ID_KSZ9031,
+       .mask = MII_KSZ9x31_SILICON_REV_MASK,
        .features = PHY_GBIT_FEATURES,
        .config   = &ksz9031_config,
        .startup  = &ksz90xx_startup,
index 3e6b5312d85a2f8f7edc488dbb54dbc76368d708..1d121c2825b81ee943a36bfdeaab5332c9fb116e 100644 (file)
 #define MII_KSZ9031_FLP_BURST_TX_LO            0x3
 #define MII_KSZ9031_FLP_BURST_TX_HI            0x4
 
+#define MII_KSZ9x31_SILICON_REV_MASK           0xfffff0
+
+#define PHY_ID_KSZ9031                         0x00221620
+
+
 /* Registers */
 #define MMD_ACCESS_CONTROL     0xd
 #define MMD_ACCESS_REG_DATA    0xe