Commit 013955a6 authored by Kunihiko Hayashi's avatar Kunihiko Hayashi Committed by David S. Miller

net: phy: realtek: rename RTL8211F_PAGE_SELECT to RTL821x_PAGE_SELECT

This renames the definition of page select register from
RTL8211F_PAGE_SELECT to RTL821x_PAGE_SELECT to use it across models.
Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ab076b94
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
#define RTL821x_INER 0x12 #define RTL821x_INER 0x12
#define RTL821x_INER_INIT 0x6400 #define RTL821x_INER_INIT 0x6400
#define RTL821x_INSR 0x13 #define RTL821x_INSR 0x13
#define RTL821x_PAGE_SELECT 0x1f
#define RTL8211E_INER_LINK_STATUS 0x400 #define RTL8211E_INER_LINK_STATUS 0x400
#define RTL8211F_INER_LINK_STATUS 0x0010 #define RTL8211F_INER_LINK_STATUS 0x0010
#define RTL8211F_INSR 0x1d #define RTL8211F_INSR 0x1d
#define RTL8211F_PAGE_SELECT 0x1f
#define RTL8211F_TX_DELAY 0x100 #define RTL8211F_TX_DELAY 0x100
MODULE_DESCRIPTION("Realtek PHY driver"); MODULE_DESCRIPTION("Realtek PHY driver");
...@@ -46,10 +46,10 @@ static int rtl8211f_ack_interrupt(struct phy_device *phydev) ...@@ -46,10 +46,10 @@ static int rtl8211f_ack_interrupt(struct phy_device *phydev)
{ {
int err; int err;
phy_write(phydev, RTL8211F_PAGE_SELECT, 0xa43); phy_write(phydev, RTL821x_PAGE_SELECT, 0xa43);
err = phy_read(phydev, RTL8211F_INSR); err = phy_read(phydev, RTL8211F_INSR);
/* restore to default page 0 */ /* restore to default page 0 */
phy_write(phydev, RTL8211F_PAGE_SELECT, 0x0); phy_write(phydev, RTL821x_PAGE_SELECT, 0x0);
return (err < 0) ? err : 0; return (err < 0) ? err : 0;
} }
...@@ -102,7 +102,7 @@ static int rtl8211f_config_init(struct phy_device *phydev) ...@@ -102,7 +102,7 @@ static int rtl8211f_config_init(struct phy_device *phydev)
if (ret < 0) if (ret < 0)
return ret; return ret;
phy_write(phydev, RTL8211F_PAGE_SELECT, 0xd08); phy_write(phydev, RTL821x_PAGE_SELECT, 0xd08);
reg = phy_read(phydev, 0x11); reg = phy_read(phydev, 0x11);
/* enable TX-delay for rgmii-id and rgmii-txid, otherwise disable it */ /* enable TX-delay for rgmii-id and rgmii-txid, otherwise disable it */
...@@ -114,7 +114,7 @@ static int rtl8211f_config_init(struct phy_device *phydev) ...@@ -114,7 +114,7 @@ static int rtl8211f_config_init(struct phy_device *phydev)
phy_write(phydev, 0x11, reg); phy_write(phydev, 0x11, reg);
/* restore to default page 0 */ /* restore to default page 0 */
phy_write(phydev, RTL8211F_PAGE_SELECT, 0x0); phy_write(phydev, RTL821x_PAGE_SELECT, 0x0);
return 0; return 0;
} }
......
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