Commit c0f0b563 authored by Luo Jie's avatar Luo Jie Committed by David S. Miller

net: phy: at803x: replace AT803X_DEVICE_ADDR with MDIO_MMD_PCS

Replace AT803X_DEVICE_ADDR with MDIO_MMD_PCS defined in mdio.h.
Signed-off-by: default avatarLuo Jie <luoj@codeaurora.org>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0b87074b
...@@ -70,7 +70,6 @@ ...@@ -70,7 +70,6 @@
#define AT803X_CDT_STATUS_DELTA_TIME_MASK GENMASK(7, 0) #define AT803X_CDT_STATUS_DELTA_TIME_MASK GENMASK(7, 0)
#define AT803X_LED_CONTROL 0x18 #define AT803X_LED_CONTROL 0x18
#define AT803X_DEVICE_ADDR 0x03
#define AT803X_LOC_MAC_ADDR_0_15_OFFSET 0x804C #define AT803X_LOC_MAC_ADDR_0_15_OFFSET 0x804C
#define AT803X_LOC_MAC_ADDR_16_31_OFFSET 0x804B #define AT803X_LOC_MAC_ADDR_16_31_OFFSET 0x804B
#define AT803X_LOC_MAC_ADDR_32_47_OFFSET 0x804A #define AT803X_LOC_MAC_ADDR_32_47_OFFSET 0x804A
...@@ -338,7 +337,8 @@ static int at803x_set_wol(struct phy_device *phydev, ...@@ -338,7 +337,8 @@ static int at803x_set_wol(struct phy_device *phydev,
const u8 *mac; const u8 *mac;
int ret; int ret;
u32 value; u32 value;
unsigned int i, offsets[] = { unsigned int i;
const unsigned int offsets[] = {
AT803X_LOC_MAC_ADDR_32_47_OFFSET, AT803X_LOC_MAC_ADDR_32_47_OFFSET,
AT803X_LOC_MAC_ADDR_16_31_OFFSET, AT803X_LOC_MAC_ADDR_16_31_OFFSET,
AT803X_LOC_MAC_ADDR_0_15_OFFSET, AT803X_LOC_MAC_ADDR_0_15_OFFSET,
...@@ -354,7 +354,7 @@ static int at803x_set_wol(struct phy_device *phydev, ...@@ -354,7 +354,7 @@ static int at803x_set_wol(struct phy_device *phydev,
return -EINVAL; return -EINVAL;
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
phy_write_mmd(phydev, AT803X_DEVICE_ADDR, offsets[i], phy_write_mmd(phydev, MDIO_MMD_PCS, offsets[i],
mac[(i * 2) + 1] | (mac[(i * 2)] << 8)); mac[(i * 2) + 1] | (mac[(i * 2)] << 8));
value = phy_read(phydev, AT803X_INTR_ENABLE); value = phy_read(phydev, AT803X_INTR_ENABLE);
......
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