diff options
author | Martin Blumenstingl <martin.blumenstingl@googlemail.com> | 2017-12-02 22:51:24 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-03 09:38:16 -0500 |
commit | 8cc5baefbc0266b6d6c8e99cb8568f59be36a575 (patch) | |
tree | 2d7c8e364b817de1d79201ebe026f381d18fffb1 /drivers/net/phy/realtek.c | |
parent | 75d0de8c7e7075d40b70b7f57903fd169c47aaa5 (diff) |
net: phy: realtek: use the BIT and GENMASK macros
This makes it easier to compare the #defines with the datasheets.
No functional changes.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/realtek.c')
-rw-r--r-- | drivers/net/phy/realtek.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c index 82efbf670c38..86a5d36ff8ba 100644 --- a/drivers/net/phy/realtek.c +++ b/drivers/net/phy/realtek.c @@ -13,21 +13,22 @@ * option) any later version. * */ +#include <linux/bitops.h> #include <linux/phy.h> #include <linux/module.h> #define RTL821x_PHYSR 0x11 -#define RTL821x_PHYSR_DUPLEX 0x2000 -#define RTL821x_PHYSR_SPEED 0xc000 +#define RTL821x_PHYSR_DUPLEX BIT(13) +#define RTL821x_PHYSR_SPEED GENMASK(15, 14) #define RTL821x_INER 0x12 #define RTL821x_INER_INIT 0x6400 #define RTL821x_INSR 0x13 #define RTL821x_PAGE_SELECT 0x1f -#define RTL8211E_INER_LINK_STATUS 0x400 +#define RTL8211E_INER_LINK_STATUS BIT(10) -#define RTL8211F_INER_LINK_STATUS 0x0010 +#define RTL8211F_INER_LINK_STATUS BIT(4) #define RTL8211F_INSR 0x1d -#define RTL8211F_TX_DELAY 0x100 +#define RTL8211F_TX_DELAY BIT(8) #define RTL8201F_ISR 0x1e #define RTL8201F_IER 0x13 |