treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA
Rename constant PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA to make
it compatible with Linux' naming.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
diff --git a/drivers/net/ag7xxx.c b/drivers/net/ag7xxx.c
index f24a917..a16c998 100644
--- a/drivers/net/ag7xxx.c
+++ b/drivers/net/ag7xxx.c
@@ -1265,7 +1265,7 @@
return ret;
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
return 0;
diff --git a/drivers/net/altera_tse.c b/drivers/net/altera_tse.c
index 2524747..b1e5c58 100644
--- a/drivers/net/altera_tse.c
+++ b/drivers/net/altera_tse.c
@@ -678,7 +678,7 @@
struct eth_pdata *pdata = dev_get_plat(dev);
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
return 0;
diff --git a/drivers/net/bcm6348-eth.c b/drivers/net/bcm6348-eth.c
index 8f1864a..5317173 100644
--- a/drivers/net/bcm6348-eth.c
+++ b/drivers/net/bcm6348-eth.c
@@ -425,7 +425,7 @@
/* get phy mode */
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -ENODEV;
/* get phy */
diff --git a/drivers/net/bcmgenet.c b/drivers/net/bcmgenet.c
index c6acb49..ef321f2 100644
--- a/drivers/net/bcmgenet.c
+++ b/drivers/net/bcmgenet.c
@@ -696,7 +696,7 @@
/* Get phy mode from DT */
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
ret = dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0,
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 7b7b0f6..1584b9e 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -921,7 +921,7 @@
pdata->iobase = dev_read_addr(dev);
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
pdata->max_speed = dev_read_u32_default(dev, "max-speed", 0);
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 9777f6c..39aedc8 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -1682,7 +1682,7 @@
interface = eqos->config->interface(dev);
- if (interface == PHY_INTERFACE_MODE_NONE) {
+ if (interface == PHY_INTERFACE_MODE_NA) {
pr_err("Invalid PHY interface\n");
return -EINVAL;
}
@@ -1743,7 +1743,7 @@
interface = eqos->config->interface(dev);
- if (interface == PHY_INTERFACE_MODE_NONE) {
+ if (interface == PHY_INTERFACE_MODE_NA) {
pr_err("Invalid PHY interface\n");
return -EINVAL;
}
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 22c2a3a..3ac8e2a 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1315,7 +1315,7 @@
priv->eth = (struct ethernet_regs *)pdata->iobase;
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
#ifdef CONFIG_DM_REGULATOR
diff --git a/drivers/net/fm/b4860.c b/drivers/net/fm/b4860.c
index 6e3d008..e622d86 100644
--- a/drivers/net/fm/b4860.c
+++ b/drivers/net/fm/b4860.c
@@ -55,7 +55,7 @@
#endif
if (is_device_disabled(port))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
/*B4860 has two 10Gig Mac*/
if ((port == FM1_10GEC1 || port == FM1_10GEC2) &&
@@ -112,7 +112,7 @@
(port == FM1_DTSEC2) ||
(port == FM1_DTSEC3) ||
(port == FM1_DTSEC4))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
}
}
@@ -131,8 +131,8 @@
return PHY_INTERFACE_MODE_SGMII;
break;
default:
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 2fed642..af94dab 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -130,7 +130,7 @@
/*
* Determine if an interface is actually active based on HW config
- * we expect fman_port_enet_if() to report PHY_INTERFACE_MODE_NONE if
+ * we expect fman_port_enet_if() to report PHY_INTERFACE_MODE_NA if
* the interface is not active based on HW cfg of the SoC
*/
void fman_enet_init(void)
@@ -141,7 +141,7 @@
phy_interface_t enet_if;
enet_if = fman_port_enet_if(fm_info[i].port);
- if (enet_if != PHY_INTERFACE_MODE_NONE) {
+ if (enet_if != PHY_INTERFACE_MODE_NA) {
fm_info[i].enabled = 1;
fm_info[i].enet_if = enet_if;
} else {
@@ -221,12 +221,12 @@
int i = fm_port_to_index(port);
if (i == -1)
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if (fm_info[i].enabled)
return fm_info[i].enet_if;
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
static void
diff --git a/drivers/net/fm/ls1043.c b/drivers/net/fm/ls1043.c
index e1abf8f..cd8376a 100644
--- a/drivers/net/fm/ls1043.c
+++ b/drivers/net/fm/ls1043.c
@@ -54,13 +54,13 @@
u32 rcwsr13 = in_be32(&gur->rcwsr[13]);
if (is_device_disabled(port))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if ((port == FM1_10GEC1) && (is_serdes_configured(XFI_FM1_MAC9)))
return PHY_INTERFACE_MODE_XGMII;
if ((port == FM1_DTSEC9) && (is_serdes_configured(XFI_FM1_MAC9)))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if (port == FM1_DTSEC3)
if ((rcwsr13 & FSL_CHASSIS2_RCWSR13_EC1) ==
@@ -107,5 +107,5 @@
break;
}
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/fm/ls1046.c b/drivers/net/fm/ls1046.c
index 09df0aa..876f48b 100644
--- a/drivers/net/fm/ls1046.c
+++ b/drivers/net/fm/ls1046.c
@@ -54,19 +54,19 @@
u32 rcwsr13 = in_be32(&gur->rcwsr[13]);
if (is_device_disabled(port))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if ((port == FM1_10GEC1) && (is_serdes_configured(XFI_FM1_MAC9)))
return PHY_INTERFACE_MODE_XGMII;
if ((port == FM1_DTSEC9) && (is_serdes_configured(XFI_FM1_MAC9)))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if ((port == FM1_10GEC2) && (is_serdes_configured(XFI_FM1_MAC10)))
return PHY_INTERFACE_MODE_XGMII;
if ((port == FM1_DTSEC10) && (is_serdes_configured(XFI_FM1_MAC10)))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if (port == FM1_DTSEC3)
if ((rcwsr13 & FSL_CHASSIS2_RCWSR13_EC1) ==
@@ -118,5 +118,5 @@
break;
}
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/fm/p1023.c b/drivers/net/fm/p1023.c
index d4167e4..c9b85fc 100644
--- a/drivers/net/fm/p1023.c
+++ b/drivers/net/fm/p1023.c
@@ -46,7 +46,7 @@
u32 pordevsr = in_be32(&gur->pordevsr);
if (is_device_disabled(port))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
/* DTSEC1 can be SGMII, RGMII or RMII */
if (port == FM1_DTSEC1) {
@@ -68,5 +68,5 @@
return PHY_INTERFACE_MODE_RGMII;
}
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/fm/p4080.c b/drivers/net/fm/p4080.c
index b78b02d..577ee22 100644
--- a/drivers/net/fm/p4080.c
+++ b/drivers/net/fm/p4080.c
@@ -54,7 +54,7 @@
u32 rcwsr11 = in_be32(&gur->rcwsr[11]);
if (is_device_disabled(port))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if ((port == FM1_10GEC1) && (is_serdes_configured(XAUI_FM1)))
return PHY_INTERFACE_MODE_XGMII;
@@ -91,8 +91,8 @@
return PHY_INTERFACE_MODE_SGMII;
break;
default:
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/fm/p5020.c b/drivers/net/fm/p5020.c
index 8189531..8ecc482 100644
--- a/drivers/net/fm/p5020.c
+++ b/drivers/net/fm/p5020.c
@@ -50,7 +50,7 @@
u32 rcwsr11 = in_be32(&gur->rcwsr[11]);
if (is_device_disabled(port))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if ((port == FM1_10GEC1) && (is_serdes_configured(XAUI_FM1)))
return PHY_INTERFACE_MODE_XGMII;
@@ -82,8 +82,8 @@
return PHY_INTERFACE_MODE_SGMII;
break;
default:
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/fm/p5040.c b/drivers/net/fm/p5040.c
index 38744e7..3a1494d 100644
--- a/drivers/net/fm/p5040.c
+++ b/drivers/net/fm/p5040.c
@@ -56,7 +56,7 @@
u32 rcwsr11 = in_be32(&gur->rcwsr[11]);
if (is_device_disabled(port))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if ((port == FM1_10GEC1) && (is_serdes_configured(XAUI_FM1)))
return PHY_INTERFACE_MODE_XGMII;
@@ -99,8 +99,8 @@
return PHY_INTERFACE_MODE_SGMII;
break;
default:
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/fm/t1024.c b/drivers/net/fm/t1024.c
index 696e74c..7110fb4 100644
--- a/drivers/net/fm/t1024.c
+++ b/drivers/net/fm/t1024.c
@@ -39,7 +39,7 @@
u32 rcwsr13 = in_be32(&gur->rcwsr[13]);
if (is_device_disabled(port))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if ((port == FM1_10GEC1) && (is_serdes_configured(XFI_FM1_MAC1)))
return PHY_INTERFACE_MODE_XGMII;
@@ -83,5 +83,5 @@
break;
}
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/fm/t1040.c b/drivers/net/fm/t1040.c
index af4f5c5..192f1c6 100644
--- a/drivers/net/fm/t1040.c
+++ b/drivers/net/fm/t1040.c
@@ -56,8 +56,8 @@
return PHY_INTERFACE_MODE_SGMII;
break;
default:
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/fm/t2080.c b/drivers/net/fm/t2080.c
index f4d8d2d..bfbd8de 100644
--- a/drivers/net/fm/t2080.c
+++ b/drivers/net/fm/t2080.c
@@ -47,7 +47,7 @@
u32 rcwsr13 = in_be32(&gur->rcwsr[13]);
if (is_device_disabled(port))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if ((port == FM1_10GEC1 || port == FM1_10GEC2) &&
((is_serdes_configured(XAUI_FM1_MAC9)) ||
@@ -85,8 +85,8 @@
return PHY_INTERFACE_MODE_SGMII;
break;
default:
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/fm/t4240.c b/drivers/net/fm/t4240.c
index f8e63c3..ba7b862 100644
--- a/drivers/net/fm/t4240.c
+++ b/drivers/net/fm/t4240.c
@@ -61,7 +61,7 @@
u32 rcwsr13 = in_be32(&gur->rcwsr[13]);
if (is_device_disabled(port))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if ((port == FM1_10GEC1 || port == FM1_10GEC2) &&
((is_serdes_configured(XAUI_FM1_MAC9)) ||
@@ -73,7 +73,7 @@
if ((port == FM1_DTSEC9 || port == FM1_DTSEC10) &&
((is_serdes_configured(XFI_FM1_MAC9)) ||
(is_serdes_configured(XFI_FM1_MAC10))))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if ((port == FM2_10GEC1 || port == FM2_10GEC2) &&
((is_serdes_configured(XAUI_FM2_MAC9)) ||
@@ -166,5 +166,5 @@
break;
}
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/fsl_enetc.c b/drivers/net/fsl_enetc.c
index 8f5af1d..1724f94 100644
--- a/drivers/net/fsl_enetc.c
+++ b/drivers/net/fsl_enetc.c
@@ -277,7 +277,7 @@
}
priv->if_type = dev_read_phy_mode(dev);
- if (priv->if_type == PHY_INTERFACE_MODE_NONE) {
+ if (priv->if_type == PHY_INTERFACE_MODE_NA) {
enetc_dbg(dev,
"phy-mode property not found, defaulting to SGMII\n");
priv->if_type = PHY_INTERFACE_MODE_SGMII;
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 626c27d..78779d7 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -553,7 +553,7 @@
pdata->iobase = dev_read_addr(dev);
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
pdata->max_speed = dev_read_u32_default(dev, "max-speed", 0);
diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c
index ce8f2df..1862235 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -567,7 +567,7 @@
priv->macif_ctrl = dev_remap_addr_index(dev, 1);
priv->phyintf = dev_read_phy_mode(dev);
- if (priv->phyintf == PHY_INTERFACE_MODE_NONE)
+ if (priv->phyintf == PHY_INTERFACE_MODE_NA)
return -ENODEV;
phy_node = dev_read_subnode(dev, "phy");
diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c b/drivers/net/ldpaa_eth/ldpaa_eth.c
index c775598..b6f589e 100644
--- a/drivers/net/ldpaa_eth/ldpaa_eth.c
+++ b/drivers/net/ldpaa_eth/ldpaa_eth.c
@@ -1127,7 +1127,7 @@
int phy_mode = -1;
phy_mode = dev_read_phy_mode(dev);
- if (phy_mode == PHY_INTERFACE_MODE_NONE) {
+ if (phy_mode == PHY_INTERFACE_MODE_NA) {
dev_err(dev, "incorrect phy mode\n");
return -EINVAL;
}
diff --git a/drivers/net/ldpaa_eth/ldpaa_wriop.c b/drivers/net/ldpaa_eth/ldpaa_wriop.c
index 06a284a..adecb81 100644
--- a/drivers/net/ldpaa_eth/ldpaa_wriop.c
+++ b/drivers/net/ldpaa_eth/ldpaa_wriop.c
@@ -16,7 +16,7 @@
__weak phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtc)
{
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
void wriop_init_dpmac(int sd, int dpmac_id, int lane_prtcl)
@@ -26,10 +26,10 @@
dpmac_info[dpmac_id].enabled = 0;
dpmac_info[dpmac_id].id = 0;
- dpmac_info[dpmac_id].enet_if = PHY_INTERFACE_MODE_NONE;
+ dpmac_info[dpmac_id].enet_if = PHY_INTERFACE_MODE_NA;
enet_if = wriop_dpmac_enet_if(dpmac_id, lane_prtcl);
- if (enet_if != PHY_INTERFACE_MODE_NONE) {
+ if (enet_if != PHY_INTERFACE_MODE_NA) {
dpmac_info[dpmac_id].enabled = 1;
dpmac_info[dpmac_id].id = dpmac_id;
dpmac_info[dpmac_id].enet_if = enet_if;
@@ -183,10 +183,10 @@
int i = wriop_dpmac_to_index(dpmac_id);
if (i == -1)
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if (dpmac_info[i].enabled)
return dpmac_info[i].enet_if;
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
diff --git a/drivers/net/ldpaa_eth/ls1088a.c b/drivers/net/ldpaa_eth/ls1088a.c
index 54cb16e..943113b 100644
--- a/drivers/net/ldpaa_eth/ls1088a.c
+++ b/drivers/net/ldpaa_eth/ls1088a.c
@@ -50,7 +50,7 @@
enum srds_prtcl;
if (is_device_disabled(dpmac_id + 1))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
switch (lane_prtcl) {
case SGMII1:
@@ -66,7 +66,7 @@
if (lane_prtcl >= QSGMII_A && lane_prtcl <= QSGMII_B)
return PHY_INTERFACE_MODE_QSGMII;
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
void wriop_init_dpmac_qsgmii(int sd, int lane_prtcl)
diff --git a/drivers/net/ldpaa_eth/ls2080a.c b/drivers/net/ldpaa_eth/ls2080a.c
index 49eee04..62e1d6b 100644
--- a/drivers/net/ldpaa_eth/ls2080a.c
+++ b/drivers/net/ldpaa_eth/ls2080a.c
@@ -62,7 +62,7 @@
enum srds_prtcl;
if (is_device_disabled(dpmac_id + 1))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if (lane_prtcl >= SGMII1 && lane_prtcl <= SGMII16)
return PHY_INTERFACE_MODE_SGMII;
@@ -76,7 +76,7 @@
if (lane_prtcl >= QSGMII_A && lane_prtcl <= QSGMII_D)
return PHY_INTERFACE_MODE_QSGMII;
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
void wriop_init_dpmac_qsgmii(int sd, int lane_prtcl)
diff --git a/drivers/net/ldpaa_eth/lx2160a.c b/drivers/net/ldpaa_eth/lx2160a.c
index e57f1a1..f0f8ee1 100644
--- a/drivers/net/ldpaa_eth/lx2160a.c
+++ b/drivers/net/ldpaa_eth/lx2160a.c
@@ -58,7 +58,7 @@
enum srds_prtcl;
if (is_device_disabled(dpmac_id))
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
if (lane_prtcl >= SGMII1 && lane_prtcl <= SGMII18)
return PHY_INTERFACE_MODE_SGMII;
@@ -78,7 +78,7 @@
if (lane_prtcl >= _100GE1 && lane_prtcl <= _100GE2)
return PHY_INTERFACE_MODE_CAUI4;
- return PHY_INTERFACE_MODE_NONE;
+ return PHY_INTERFACE_MODE_NA;
}
#ifdef CONFIG_SYS_FSL_HAS_RGMII
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 317b380..e02a57b 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -1363,7 +1363,7 @@
int ret;
macb->phy_interface = dev_read_phy_mode(dev);
- if (macb->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (macb->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
/* Read phyaddr from DT */
diff --git a/drivers/net/mscc_eswitch/jr2_switch.c b/drivers/net/mscc_eswitch/jr2_switch.c
index d1e5b61..1462b8f 100644
--- a/drivers/net/mscc_eswitch/jr2_switch.c
+++ b/drivers/net/mscc_eswitch/jr2_switch.c
@@ -954,7 +954,7 @@
phy = phy_connect(priv->ports[i].bus,
priv->ports[i].phy_addr, dev,
- PHY_INTERFACE_MODE_NONE);
+ PHY_INTERFACE_MODE_NA);
if (phy)
board_phy_config(phy);
}
diff --git a/drivers/net/mscc_eswitch/luton_switch.c b/drivers/net/mscc_eswitch/luton_switch.c
index 73c950d..5e4f00c 100644
--- a/drivers/net/mscc_eswitch/luton_switch.c
+++ b/drivers/net/mscc_eswitch/luton_switch.c
@@ -685,7 +685,7 @@
phy = phy_connect(priv->ports[i].bus,
priv->ports[i].phy_addr, dev,
- PHY_INTERFACE_MODE_NONE);
+ PHY_INTERFACE_MODE_NA);
if (phy && i >= MAX_INT_PORT)
board_phy_config(phy);
}
diff --git a/drivers/net/mscc_eswitch/ocelot_switch.c b/drivers/net/mscc_eswitch/ocelot_switch.c
index d1d0a48..1bf6c42 100644
--- a/drivers/net/mscc_eswitch/ocelot_switch.c
+++ b/drivers/net/mscc_eswitch/ocelot_switch.c
@@ -608,7 +608,7 @@
phy = phy_connect(priv->ports[i].bus,
priv->ports[i].phy_addr, dev,
- PHY_INTERFACE_MODE_NONE);
+ PHY_INTERFACE_MODE_NA);
if (phy && external_bus(priv, i))
board_phy_config(phy);
}
diff --git a/drivers/net/mscc_eswitch/serval_switch.c b/drivers/net/mscc_eswitch/serval_switch.c
index c4b81f7..38ddba1 100644
--- a/drivers/net/mscc_eswitch/serval_switch.c
+++ b/drivers/net/mscc_eswitch/serval_switch.c
@@ -561,7 +561,7 @@
phy = phy_connect(priv->ports[i].bus,
priv->ports[i].phy_addr, dev,
- PHY_INTERFACE_MODE_NONE);
+ PHY_INTERFACE_MODE_NA);
if (phy)
board_phy_config(phy);
}
diff --git a/drivers/net/mscc_eswitch/servalt_switch.c b/drivers/net/mscc_eswitch/servalt_switch.c
index f114086..db863c2 100644
--- a/drivers/net/mscc_eswitch/servalt_switch.c
+++ b/drivers/net/mscc_eswitch/servalt_switch.c
@@ -482,7 +482,7 @@
continue;
phy_connect(priv->ports[i].bus, priv->ports[i].phy_addr, dev,
- PHY_INTERFACE_MODE_NONE);
+ PHY_INTERFACE_MODE_NA);
}
return 0;
diff --git a/drivers/net/mt7620-eth.c b/drivers/net/mt7620-eth.c
index 24fcb93..038cba1 100644
--- a/drivers/net/mt7620-eth.c
+++ b/drivers/net/mt7620-eth.c
@@ -596,7 +596,7 @@
case PHY_INTERFACE_MODE_RGMII:
ge_mode = MT7620_SYSC_GE_RGMII;
break;
- case PHY_INTERFACE_MODE_NONE:
+ case PHY_INTERFACE_MODE_NA:
if (gmac == 2)
ge_mode = MT7620_SYSC_GE_ESW_PHY;
else
@@ -620,7 +620,7 @@
{
u32 pmcr;
- if (port_cfg->mode == PHY_INTERFACE_MODE_NONE) {
+ if (port_cfg->mode == PHY_INTERFACE_MODE_NA) {
if (port == 5) {
gsw_write(priv, GSW_PMCR(port), FORCE_MODE);
return;
@@ -666,7 +666,7 @@
{
int phy_addr_st, phy_addr_end;
- if (priv->port_cfg[0].mode == PHY_INTERFACE_MODE_NONE)
+ if (priv->port_cfg[0].mode == PHY_INTERFACE_MODE_NA)
priv->ephy_num = NUM_FE_PHYS;
else
priv->ephy_num = NUM_FE_PHYS - 1;
@@ -1057,7 +1057,7 @@
case PHY_INTERFACE_MODE_MII:
case PHY_INTERFACE_MODE_RMII:
case PHY_INTERFACE_MODE_RGMII:
- case PHY_INTERFACE_MODE_NONE:
+ case PHY_INTERFACE_MODE_NA:
break;
default:
dev_err(priv->dev, "mt7620_eth: unsupported phy-mode\n");
@@ -1128,14 +1128,14 @@
if (ret)
return ret;
} else {
- priv->port_cfg[0].mode = PHY_INTERFACE_MODE_NONE;
+ priv->port_cfg[0].mode = PHY_INTERFACE_MODE_NA;
}
subnode = ofnode_find_subnode(dev_ofnode(dev), "port5");
if (ofnode_valid(subnode))
return mt7620_eth_parse_gsw_port(priv, 1, subnode);
- priv->port_cfg[1].mode = PHY_INTERFACE_MODE_NONE;
+ priv->port_cfg[1].mode = PHY_INTERFACE_MODE_NA;
return 0;
}
diff --git a/drivers/net/mtk_eth.c b/drivers/net/mtk_eth.c
index d6065db..666ddeb 100644
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -1449,7 +1449,7 @@
/* Interface mode is required */
pdata->phy_interface = dev_read_phy_mode(dev);
priv->phy_interface = pdata->phy_interface;
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE) {
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA) {
printf("error: phy-mode is not set\n");
return -EINVAL;
}
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 32ec0b4..bf5ed55 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -1005,7 +1005,7 @@
/* Get phy-mode / phy_interface from DT */
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
pdata->phy_interface = PHY_INTERFACE_MODE_GMII;
dmvgbe->phy_interface = pdata->phy_interface;
diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c
index d31b96a..e2ac4d8 100644
--- a/drivers/net/mvneta.c
+++ b/drivers/net/mvneta.c
@@ -1804,7 +1804,7 @@
/* Get phy-mode / phy_interface from DT */
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
return 0;
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index dfddac1..8c9afdf 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -4820,7 +4820,7 @@
}
port->phy_interface = dev_read_phy_mode(dev);
- if (port->phy_interface == PHY_INTERFACE_MODE_NONE) {
+ if (port->phy_interface == PHY_INTERFACE_MODE_NA) {
dev_err(dev, "incorrect phy mode\n");
return -EINVAL;
}
diff --git a/drivers/net/pic32_eth.c b/drivers/net/pic32_eth.c
index 03eb51e..1333a3a 100644
--- a/drivers/net/pic32_eth.c
+++ b/drivers/net/pic32_eth.c
@@ -550,7 +550,7 @@
/* get phy mode */
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
/* get phy addr */
diff --git a/drivers/net/qe/dm_qe_uec.c b/drivers/net/qe/dm_qe_uec.c
index 5a66d72..8fec1c2 100644
--- a/drivers/net/qe/dm_qe_uec.c
+++ b/drivers/net/qe/dm_qe_uec.c
@@ -1137,7 +1137,7 @@
pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
return 0;
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index f6d386b..5c152d6 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -679,7 +679,7 @@
pdata->iobase = dev_read_addr(dev);
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
pdata->max_speed = 1000;
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 04c9c2d..5c57e3d 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -920,7 +920,7 @@
pdata->iobase = dev_read_addr(dev);
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
pdata->max_speed = 1000;
diff --git a/drivers/net/sni_ave.c b/drivers/net/sni_ave.c
index 0a368c6..d684e60 100644
--- a/drivers/net/sni_ave.c
+++ b/drivers/net/sni_ave.c
@@ -749,7 +749,7 @@
pdata->iobase = dev_read_addr(dev);
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
pdata->max_speed = 0;
diff --git a/drivers/net/sni_netsec.c b/drivers/net/sni_netsec.c
index 693fd3a..24caacf 100644
--- a/drivers/net/sni_netsec.c
+++ b/drivers/net/sni_netsec.c
@@ -1034,7 +1034,7 @@
priv->eeprom_base = dev_read_addr_index(dev, 1) - EERPROM_MAP_OFFSET;
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
if (!dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0,
diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c
index 5654a34..5943a5e 100644
--- a/drivers/net/sun8i_emac.c
+++ b/drivers/net/sun8i_emac.c
@@ -947,7 +947,7 @@
pdata->phy_interface = dev_read_phy_mode(dev);
printf("phy interface%d\n", pdata->phy_interface);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
if (priv->variant == H3_EMAC) {
diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c
index c1da334..9580fa3 100644
--- a/drivers/net/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ti/am65-cpsw-nuss.c
@@ -607,7 +607,7 @@
dev_read_u32(dev, "reg", &priv->port_id);
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE) {
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA) {
dev_err(dev, "Invalid PHY mode, port %u\n", priv->port_id);
return -EINVAL;
}
diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c
index 5b7bab7..8988c21 100644
--- a/drivers/net/ti/cpsw.c
+++ b/drivers/net/ti/cpsw.c
@@ -1345,7 +1345,7 @@
}
pdata->phy_interface = data->slave_data[data->active_slave].phy_if;
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
return 0;
diff --git a/drivers/net/ti/keystone_net.c b/drivers/net/ti/keystone_net.c
index b55e7da..16e3f32 100644
--- a/drivers/net/ti/keystone_net.c
+++ b/drivers/net/ti/keystone_net.c
@@ -728,7 +728,7 @@
priv->has_mdio = true;
} else if (priv->link_type == LINK_TYPE_RGMII_LINK_MAC_PHY) {
priv->phy_if = ofnode_read_phy_mode(offset_to_ofnode(slave));
- if (priv->phy_if == PHY_INTERFACE_MODE_NONE)
+ if (priv->phy_if == PHY_INTERFACE_MODE_NA)
priv->phy_if = PHY_INTERFACE_MODE_RGMII;
pdata->phy_interface = priv->phy_if;
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index fec051e..d69a9ff 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -894,7 +894,7 @@
priv->tbiaddr = tbiaddr;
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
pdata->phy_interface = tsec_get_interface(priv);
priv->interface = pdata->phy_interface;
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 02d13c3..a471573 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -850,7 +850,7 @@
}
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
plat->eth_hasnobuf = fdtdec_get_bool(gd->fdt_blob, node,
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 0062851..cf6c53c 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -859,7 +859,7 @@
}
pdata->phy_interface = dev_read_phy_mode(dev);
- if (pdata->phy_interface == PHY_INTERFACE_MODE_NONE)
+ if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
priv->interface = pdata->phy_interface;