lan78xx: Remove phy defines in lan78xx.h and use defines in include/linux/microchipphy.h

Remove phy defines in lan78xx.h and use defines in include/linux/microchipphy.h.

Signed-off-by: Woojung Huh <woojung.huh@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 5d9c527..6bb2923 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -30,6 +30,7 @@
 #include <linux/ipv6.h>
 #include <linux/mdio.h>
 #include <net/ip6_checksum.h>
+#include <linux/microchipphy.h>
 #include "lan78xx.h"
 
 #define DRIVER_AUTHOR	"WOOJUNG HUH <woojung.huh@microchip.com>"
@@ -837,8 +838,7 @@
 	u32 buf;
 
 	/* clear PHY interrupt status */
-	/* VTSE PHY */
-	ret = phy_read(phydev, PHY_VTSE_INT_STS);
+	ret = phy_read(phydev, LAN88XX_INT_STS);
 	if (unlikely(ret < 0))
 		return -EIO;
 
@@ -866,7 +866,7 @@
 
 		phy_ethtool_gset(phydev, &ecmd);
 
-		ret = phy_read(phydev, PHY_VTSE_INT_STS);
+		ret = phy_read(phydev, LAN88XX_INT_STS);
 
 		if (dev->udev->speed == USB_SPEED_SUPER) {
 			if (ethtool_cmd_speed(&ecmd) == 1000) {
@@ -1188,18 +1188,18 @@
 
 	ret = phy_ethtool_gset(phydev, cmd);
 
-	phy_write(phydev, PHY_EXT_GPIO_PAGE, PHY_EXT_GPIO_PAGE_SPACE_1);
-	buf = phy_read(phydev, PHY_EXT_MODE_CTRL);
-	phy_write(phydev, PHY_EXT_GPIO_PAGE, PHY_EXT_GPIO_PAGE_SPACE_0);
+	phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS, LAN88XX_EXT_PAGE_SPACE_1);
+	buf = phy_read(phydev, LAN88XX_EXT_MODE_CTRL);
+	phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS, LAN88XX_EXT_PAGE_SPACE_0);
 
-	buf &= PHY_EXT_MODE_CTRL_MDIX_MASK_;
-	if (buf == PHY_EXT_MODE_CTRL_AUTO_MDIX_) {
+	buf &= LAN88XX_EXT_MODE_CTRL_MDIX_MASK_;
+	if (buf == LAN88XX_EXT_MODE_CTRL_AUTO_MDIX_) {
 		cmd->eth_tp_mdix = ETH_TP_MDI_AUTO;
 		cmd->eth_tp_mdix_ctrl = ETH_TP_MDI_AUTO;
-	} else if (buf == PHY_EXT_MODE_CTRL_MDI_) {
+	} else if (buf == LAN88XX_EXT_MODE_CTRL_MDI_) {
 		cmd->eth_tp_mdix = ETH_TP_MDI;
 		cmd->eth_tp_mdix_ctrl = ETH_TP_MDI;
-	} else if (buf == PHY_EXT_MODE_CTRL_MDI_X_) {
+	} else if (buf == LAN88XX_EXT_MODE_CTRL_MDI_X_) {
 		cmd->eth_tp_mdix = ETH_TP_MDI_X;
 		cmd->eth_tp_mdix_ctrl = ETH_TP_MDI_X;
 	}
@@ -1222,32 +1222,32 @@
 
 	if (dev->mdix_ctrl != cmd->eth_tp_mdix_ctrl) {
 		if (cmd->eth_tp_mdix_ctrl == ETH_TP_MDI) {
-			phy_write(phydev, PHY_EXT_GPIO_PAGE,
-				  PHY_EXT_GPIO_PAGE_SPACE_1);
-			temp = phy_read(phydev, PHY_EXT_MODE_CTRL);
-			temp &= ~PHY_EXT_MODE_CTRL_MDIX_MASK_;
-			phy_write(phydev, PHY_EXT_MODE_CTRL,
-				  temp | PHY_EXT_MODE_CTRL_MDI_);
-			phy_write(phydev, PHY_EXT_GPIO_PAGE,
-				  PHY_EXT_GPIO_PAGE_SPACE_0);
+			phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS,
+				  LAN88XX_EXT_PAGE_SPACE_1);
+			temp = phy_read(phydev, LAN88XX_EXT_MODE_CTRL);
+			temp &= ~LAN88XX_EXT_MODE_CTRL_MDIX_MASK_;
+			phy_write(phydev, LAN88XX_EXT_MODE_CTRL,
+				  temp | LAN88XX_EXT_MODE_CTRL_MDI_);
+			phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS,
+				  LAN88XX_EXT_PAGE_SPACE_0);
 		} else if (cmd->eth_tp_mdix_ctrl == ETH_TP_MDI_X) {
-			phy_write(phydev, PHY_EXT_GPIO_PAGE,
-				  PHY_EXT_GPIO_PAGE_SPACE_1);
-			temp = phy_read(phydev, PHY_EXT_MODE_CTRL);
-			temp &= ~PHY_EXT_MODE_CTRL_MDIX_MASK_;
-			phy_write(phydev, PHY_EXT_MODE_CTRL,
-				  temp | PHY_EXT_MODE_CTRL_MDI_X_);
-			phy_write(phydev, PHY_EXT_GPIO_PAGE,
-				  PHY_EXT_GPIO_PAGE_SPACE_0);
+			phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS,
+				  LAN88XX_EXT_PAGE_SPACE_1);
+			temp = phy_read(phydev, LAN88XX_EXT_MODE_CTRL);
+			temp &= ~LAN88XX_EXT_MODE_CTRL_MDIX_MASK_;
+			phy_write(phydev, LAN88XX_EXT_MODE_CTRL,
+				  temp | LAN88XX_EXT_MODE_CTRL_MDI_X_);
+			phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS,
+				  LAN88XX_EXT_PAGE_SPACE_0);
 		} else if (cmd->eth_tp_mdix_ctrl == ETH_TP_MDI_AUTO) {
-			phy_write(phydev, PHY_EXT_GPIO_PAGE,
-				  PHY_EXT_GPIO_PAGE_SPACE_1);
-			temp = phy_read(phydev, PHY_EXT_MODE_CTRL);
-			temp &= ~PHY_EXT_MODE_CTRL_MDIX_MASK_;
-			phy_write(phydev, PHY_EXT_MODE_CTRL,
-				  temp | PHY_EXT_MODE_CTRL_AUTO_MDIX_);
-			phy_write(phydev, PHY_EXT_GPIO_PAGE,
-				  PHY_EXT_GPIO_PAGE_SPACE_0);
+			phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS,
+				  LAN88XX_EXT_PAGE_SPACE_1);
+			temp = phy_read(phydev, LAN88XX_EXT_MODE_CTRL);
+			temp &= ~LAN88XX_EXT_MODE_CTRL_MDIX_MASK_;
+			phy_write(phydev, LAN88XX_EXT_MODE_CTRL,
+				  temp | LAN88XX_EXT_MODE_CTRL_AUTO_MDIX_);
+			phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS,
+				  LAN88XX_EXT_PAGE_SPACE_0);
 		}
 	}
 
@@ -1504,12 +1504,12 @@
 	}
 
 	/* set to AUTOMDIX */
-	phy_write(phydev, PHY_EXT_GPIO_PAGE, PHY_EXT_GPIO_PAGE_SPACE_1);
-	ret = phy_read(phydev, PHY_EXT_MODE_CTRL);
-	ret &= ~PHY_EXT_MODE_CTRL_MDIX_MASK_;
-	phy_write(phydev, PHY_EXT_MODE_CTRL,
-		  ret | PHY_EXT_MODE_CTRL_AUTO_MDIX_);
-	phy_write(phydev, PHY_EXT_GPIO_PAGE, PHY_EXT_GPIO_PAGE_SPACE_0);
+	phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS, LAN88XX_EXT_PAGE_SPACE_1);
+	ret = phy_read(phydev, LAN88XX_EXT_MODE_CTRL);
+	ret &= ~LAN88XX_EXT_MODE_CTRL_MDIX_MASK_;
+	phy_write(phydev, LAN88XX_EXT_MODE_CTRL,
+		  ret | LAN88XX_EXT_MODE_CTRL_AUTO_MDIX_);
+	phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS, LAN88XX_EXT_PAGE_SPACE_0);
 	dev->mdix_ctrl = ETH_TP_MDI_AUTO;
 
 	/* MAC doesn't support 1000T Half */