]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA
authorMarek Behún <marek.behun@nic.cz>
Wed, 6 Apr 2022 22:33:03 +0000 (00:33 +0200)
committerRamon Fried <ramon@neureality.ai>
Sun, 10 Apr 2022 05:44:13 +0000 (08:44 +0300)
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>
61 files changed:
board/freescale/corenet_ds/eth_hydra.c
board/freescale/corenet_ds/eth_superhydra.c
board/freescale/t104xrdb/eth.c
drivers/core/ofnode.c
drivers/net/ag7xxx.c
drivers/net/altera_tse.c
drivers/net/bcm6348-eth.c
drivers/net/bcmgenet.c
drivers/net/designware.c
drivers/net/dwc_eth_qos.c
drivers/net/fec_mxc.c
drivers/net/fm/b4860.c
drivers/net/fm/init.c
drivers/net/fm/ls1043.c
drivers/net/fm/ls1046.c
drivers/net/fm/p1023.c
drivers/net/fm/p4080.c
drivers/net/fm/p5020.c
drivers/net/fm/p5040.c
drivers/net/fm/t1024.c
drivers/net/fm/t1040.c
drivers/net/fm/t2080.c
drivers/net/fm/t4240.c
drivers/net/fsl_enetc.c
drivers/net/ftgmac100.c
drivers/net/higmacv300.c
drivers/net/ldpaa_eth/ldpaa_eth.c
drivers/net/ldpaa_eth/ldpaa_wriop.c
drivers/net/ldpaa_eth/ls1088a.c
drivers/net/ldpaa_eth/ls2080a.c
drivers/net/ldpaa_eth/lx2160a.c
drivers/net/macb.c
drivers/net/mscc_eswitch/jr2_switch.c
drivers/net/mscc_eswitch/luton_switch.c
drivers/net/mscc_eswitch/ocelot_switch.c
drivers/net/mscc_eswitch/serval_switch.c
drivers/net/mscc_eswitch/servalt_switch.c
drivers/net/mt7620-eth.c
drivers/net/mtk_eth.c
drivers/net/mvgbe.c
drivers/net/mvneta.c
drivers/net/mvpp2.c
drivers/net/pic32_eth.c
drivers/net/qe/dm_qe_uec.c
drivers/net/ravb.c
drivers/net/sh_eth.c
drivers/net/sni_ave.c
drivers/net/sni_netsec.c
drivers/net/sun8i_emac.c
drivers/net/ti/am65-cpsw-nuss.c
drivers/net/ti/cpsw.c
drivers/net/ti/keystone_net.c
drivers/net/tsec.c
drivers/net/xilinx_axi_emac.c
drivers/net/zynq_gem.c
include/dm/ofnode.h
include/dm/read.h
include/fm_eth.h
include/phy_interface.h
include/vsc9953.h
net/mdio-uclass.c

index 6500c2fcf679cf580bcbb7778d0b04f29ee13b8b..a27e905ace9d52e6243bd99844fa695eec2d1370 100644 (file)
@@ -471,7 +471,7 @@ int board_eth_init(struct bd_info *bis)
                        fm_info_set_mdio(i,
                                miiphy_get_dev_by_name("HYDRA_RGMII_MDIO"));
                        break;
-               case PHY_INTERFACE_MODE_NONE:
+               case PHY_INTERFACE_MODE_NA:
                        fm_info_set_phy_address(i, 0);
                        break;
                default:
index de7b692f3febcd3f01bc89643b4ded348b1a7d5f..55bac0f7615d6771739158cfd2debcc57c577601 100644 (file)
@@ -583,7 +583,7 @@ int board_eth_init(struct bd_info *bis)
                        fm_info_set_mdio(i,
                                miiphy_get_dev_by_name("SUPER_HYDRA_RGMII_MDIO"));
                        break;
-               case PHY_INTERFACE_MODE_NONE:
+               case PHY_INTERFACE_MODE_NA:
                        fm_info_set_phy_address(i, 0);
                        break;
                default:
@@ -733,7 +733,7 @@ int board_eth_init(struct bd_info *bis)
                        fm_info_set_mdio(i,
                        miiphy_get_dev_by_name("SUPER_HYDRA_RGMII_MDIO"));
                        break;
-               case PHY_INTERFACE_MODE_NONE:
+               case PHY_INTERFACE_MODE_NA:
                        fm_info_set_phy_address(i, 0);
                        break;
                default:
index b034f11d68aaae85177903c8e41430b4c86d0a63..3ae5d722aab37bd6f470aca469e4910bed1fb320 100644 (file)
@@ -89,7 +89,7 @@ int board_eth_init(struct bd_info *bis)
                case PHY_INTERFACE_MODE_QSGMII:
                        fm_info_set_phy_address(i, 0);
                        break;
-               case PHY_INTERFACE_MODE_NONE:
+               case PHY_INTERFACE_MODE_NA:
                        fm_info_set_phy_address(i, 0);
                        break;
                default:
@@ -99,7 +99,7 @@ int board_eth_init(struct bd_info *bis)
                        break;
                }
                if (fm_info_get_enet_if(i) == PHY_INTERFACE_MODE_QSGMII ||
-                   fm_info_get_enet_if(i) == PHY_INTERFACE_MODE_NONE)
+                   fm_info_get_enet_if(i) == PHY_INTERFACE_MODE_NA)
                        fm_info_set_mdio(i, NULL);
                else
                        fm_info_set_mdio(i,
index d9ccb1bad268d88e0945f6287673591edb24faa9..a59832ebbfb3027fc9df6fdc0d00164b8c8d3054 100644 (file)
@@ -1232,7 +1232,7 @@ phy_interface_t ofnode_read_phy_mode(ofnode node)
                mode = ofnode_read_string(node, "phy-connection-type");
 
        if (!mode)
-               return PHY_INTERFACE_MODE_NONE;
+               return PHY_INTERFACE_MODE_NA;
 
        for (i = 0; i < PHY_INTERFACE_MODE_MAX; i++)
                if (!strcmp(mode, phy_interface_strings[i]))
@@ -1240,5 +1240,5 @@ phy_interface_t ofnode_read_phy_mode(ofnode node)
 
        debug("%s: Invalid PHY interface '%s'\n", __func__, mode);
 
-       return PHY_INTERFACE_MODE_NONE;
+       return PHY_INTERFACE_MODE_NA;
 }
index f24a917bd43acba1f5a4b48dd3bf913c4c164bcb..a16c998b2ab9c9a576a0661cb107584b8973650b 100644 (file)
@@ -1265,7 +1265,7 @@ static int ag7xxx_eth_of_to_plat(struct udevice *dev)
                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;
index 25247472b033bf1aca875915a3b321d74490709a..b1e5c5890aae8b8284df158ccabffe3b24e5b506 100644 (file)
@@ -678,7 +678,7 @@ static int altera_tse_of_to_plat(struct udevice *dev)
        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;
index 8f1864a334c7299b3f10b1862316d9f20b6aabd4..53171736117cea6b45233dfbda869432495191a1 100644 (file)
@@ -425,7 +425,7 @@ static int bcm6348_eth_probe(struct udevice *dev)
 
        /* 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 */
index c6acb4932b480a677efb61818b3b05968adfddb7..ef321f283999621b12c99971833f438a85d7f127 100644 (file)
@@ -696,7 +696,7 @@ static int bcmgenet_eth_of_to_plat(struct udevice *dev)
 
        /* 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,
index 7b7b0f65780828c07394a4d028c621c3add23bb0..1584b9eac173b1ba6ca0c41b93b90bb46fd7974f 100644 (file)
@@ -921,7 +921,7 @@ int designware_eth_of_to_plat(struct udevice *dev)
 
        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);
index 9777f6cb9c60d280a12b32ee074a61f9344eb74b..39aedc80f44f5591dd39d815fe89b7c30305f263 100644 (file)
@@ -1682,7 +1682,7 @@ static int eqos_probe_resources_stm32(struct udevice *dev)
 
        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 @@ static int eqos_probe_resources_imx(struct udevice *dev)
 
        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;
        }
index 22c2a3a30f29992e5256341270584f51dac29418..3ac8e2a9cd100b6ef4084d913c30e6cb7f9aa3ad 100644 (file)
@@ -1315,7 +1315,7 @@ static int fecmxc_of_to_plat(struct udevice *dev)
        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
index 6e3d008199a5c6f9c6a7d9bc7ab7136c25cef6bd..e622d86ba38c5aedd6800a7b7508458774a9bf4d 100644 (file)
@@ -55,7 +55,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
 #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 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                                         (port == FM1_DTSEC2) ||
                                         (port == FM1_DTSEC3) ||
                                         (port == FM1_DTSEC4))
-                                       return PHY_INTERFACE_MODE_NONE;
+                                       return PHY_INTERFACE_MODE_NA;
                        }
                }
        }
@@ -131,8 +131,8 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                        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;
 }
index 2fed64205cb18264395d8dfb1cbd324723589fec..af94dabe291e4f1afd2ab2bd0117675c3c1a76f2 100644 (file)
@@ -130,7 +130,7 @@ static int fm_port_to_index(enum fm_port port)
 
 /*
  * 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 @@ void fman_enet_init(void)
                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 @@ phy_interface_t fm_info_get_enet_if(enum fm_port port)
        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
index e1abf8f6bb71ad7075400ff1b4326073836bfb49..cd8376a6150d7820564acb4df2333403876c7f66 100644 (file)
@@ -54,13 +54,13 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        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 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                break;
        }
 
-       return PHY_INTERFACE_MODE_NONE;
+       return PHY_INTERFACE_MODE_NA;
 }
index 09df0aa53766517fba46d1bdd6c4d577389a0b1a..876f48b14775a6f075dfe1086622b3598b2339ce 100644 (file)
@@ -54,19 +54,19 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        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 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                break;
        }
 
-       return PHY_INTERFACE_MODE_NONE;
+       return PHY_INTERFACE_MODE_NA;
 }
index d4167e4d696f8b836acbaede6d7082b1a07b8667..c9b85fc8a8a6c8ba6c95f90d1ed1dc6bd8f49975 100644 (file)
@@ -46,7 +46,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        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 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                        return PHY_INTERFACE_MODE_RGMII;
        }
 
-       return PHY_INTERFACE_MODE_NONE;
+       return PHY_INTERFACE_MODE_NA;
 }
index b78b02d8284fbee3181e7e4375bad3fcd6f3fc35..577ee22cb0adb27afca779b66128cc174b2dcdd7 100644 (file)
@@ -54,7 +54,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        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 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                        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;
 }
index 8189531215311f10440bd9352b02356d1a308521..8ecc48276a91d08fb2d9d0e42e86c700d5b60610 100644 (file)
@@ -50,7 +50,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        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 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                        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;
 }
index 38744e7b7b314787fe948ddd04d437598168d4a5..3a1494d1315fee68ad840dc3386d996a8a7fd6bc 100644 (file)
@@ -56,7 +56,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        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 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                        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;
 }
index 696e74c9e6fef1951cc30ac4f374ba238dea9574..7110fb4fb116892a01ce1437c133240e39e3712e 100644 (file)
@@ -39,7 +39,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        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 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                break;
        }
 
-       return PHY_INTERFACE_MODE_NONE;
+       return PHY_INTERFACE_MODE_NA;
 }
index af4f5c561075b96edea613503e624cfdd4ee678d..192f1c6c81e7b5c5f2d5cd3041e7e34c8d0b9b22 100644 (file)
@@ -56,8 +56,8 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                        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;
 }
index f4d8d2d869a3364cc667826c1faa5a1b249a92f9..bfbd8de9cf147783678a1ff169e8836e5cbeb8cb 100644 (file)
@@ -47,7 +47,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        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 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                        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;
 }
index f8e63c3d719719336cb7b5d19a90753d135276ff..ba7b86282fbbcfe61943518b13077b13c0de8849 100644 (file)
@@ -61,7 +61,7 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        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 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
        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 @@ phy_interface_t fman_port_enet_if(enum fm_port port)
                break;
        }
 
-       return PHY_INTERFACE_MODE_NONE;
+       return PHY_INTERFACE_MODE_NA;
 }
index 8f5af1dbc03bd4332b12aedc2d3781fdccf1cce2..1724f948bcd564540ffb83a570af2b48e16c6270 100644 (file)
@@ -277,7 +277,7 @@ static void enetc_start_pcs(struct udevice *dev)
        }
 
        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;
index 626c27d7bf8c95962f543312c5f3c44b8c5b44dc..78779d7d60b916b9b01059420b06c8c0297ad6bd 100644 (file)
@@ -553,7 +553,7 @@ static int ftgmac100_of_to_plat(struct udevice *dev)
        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);
index ce8f2dfd09870d7429778f8c7523a98ea0e988d8..1862235d0cd24cd276af4c5ca9ce44fb3e66e5dd 100644 (file)
@@ -567,7 +567,7 @@ static int higmac_of_to_plat(struct udevice *dev)
        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");
index c775598b91f96f84cb9d7054ee80262317fec803..b6f589eb91a5dd34cace4cd2ff74bea761ddcd5c 100644 (file)
@@ -1127,7 +1127,7 @@ static int ldpaa_eth_bind(struct udevice *dev)
        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;
        }
index 06a284ad684d8534b88ed58a3e28491ad6a87431..adecb8135764f97087d7f79c419a86784c16e16f 100644 (file)
@@ -16,7 +16,7 @@ struct wriop_dpmac_info dpmac_info[NUM_WRIOP_PORTS];
 
 __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 @@ void wriop_init_dpmac(int sd, int dpmac_id, int lane_prtcl)
 
        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 @@ phy_interface_t wriop_get_enet_if(int dpmac_id)
        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;
 }
index 54cb16e51b1f3d1bd6af6f5760b0235170d51728..943113b20aa2ce11c2c096a0f796ca57bc924375 100644 (file)
@@ -50,7 +50,7 @@ phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtcl)
        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 @@ phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtcl)
        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)
index 49eee044f35bcd4b291338dba4728d64b022e75a..62e1d6b869101c6a956eab9af607f5aada964e6a 100644 (file)
@@ -62,7 +62,7 @@ phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtcl)
        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 @@ phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtcl)
        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)
index e57f1a19a5921d5c181da9ed97b21d0fa1120b1a..f0f8ee1d4de7bdbf6656528cd524b16fbfb8b68c 100644 (file)
@@ -58,7 +58,7 @@ phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtcl)
        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 @@ phy_interface_t wriop_dpmac_enet_if(int dpmac_id, int lane_prtcl)
        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
index 317b380e8fe1acd44da112f9e89f216c0f784ccb..e02a57b4114c312b3abc805d17839af4a8ec73b7 100644 (file)
@@ -1363,7 +1363,7 @@ static int macb_eth_probe(struct udevice *dev)
        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 */
index d1e5b61ea54319e4558d0c56f5995fc89699781e..1462b8f3bc8d3c6694f74d2126a2a7b310a19549 100644 (file)
@@ -954,7 +954,7 @@ static int jr2_probe(struct udevice *dev)
 
                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);
        }
index 73c950d118ff420417c6302a77b4dba4587692f7..5e4f00c4f4d943505273b884e139158bc0c639ba 100644 (file)
@@ -685,7 +685,7 @@ static int luton_probe(struct udevice *dev)
 
                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);
        }
index d1d0a489ab409e35cabc11587952804fa6fd4a99..1bf6c42c0fc5c368b1fe87dc00094626e87b3d86 100644 (file)
@@ -608,7 +608,7 @@ static int ocelot_probe(struct udevice *dev)
 
                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);
        }
index c4b81f7529435d1462f73e3055e87ea7f1d477da..38ddba12b66496c8bb625d850d65e4acd0ffa7f3 100644 (file)
@@ -561,7 +561,7 @@ static int serval_probe(struct udevice *dev)
 
                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);
        }
index f114086ece6fe11adde8c7bb2c96bb0784a73bbb..db863c2a9fff1840b35b83f93a64af0e1946fa02 100644 (file)
@@ -482,7 +482,7 @@ static int servalt_probe(struct udevice *dev)
                        continue;
 
                phy_connect(priv->ports[i].bus, priv->ports[i].phy_addr, dev,
-                           PHY_INTERFACE_MODE_NONE);
+                           PHY_INTERFACE_MODE_NA);
        }
 
        return 0;
index 24fcb9373f83d0ed021036e331918a0af35e1d99..038cba12407a530a949dc0190c4ae7b2e63e5cd4 100644 (file)
@@ -596,7 +596,7 @@ static int mt7620_setup_gmac_mode(struct mt7620_eth_priv *priv, u32 gmac,
        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 @@ static void mt7620_gsw_setup_port(struct mt7620_eth_priv *priv, u32 port,
 {
        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 @@ static void mt7620_gsw_setup_phy_polling(struct mt7620_eth_priv *priv)
 {
        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 @@ static int mt7620_eth_parse_gsw_port(struct mt7620_eth_priv *priv, u32 idx,
        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 @@ static int mt7620_eth_parse_gsw_cfg(struct udevice *dev)
                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;
 }
 
index d6065db5fb71cc55b4f7885654acff9dfb8587e1..666ddeb10d157b87822a9d80ef24a4dae076f43b 100644 (file)
@@ -1449,7 +1449,7 @@ static int mtk_eth_of_to_plat(struct udevice *dev)
        /* 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;
        }
index 32ec0b437d3b631c376ef6bf490774fd4d389026..bf5ed5513ba3d0bbf534bd875200e56733e15197 100644 (file)
@@ -1005,7 +1005,7 @@ static int mvgbe_of_to_plat(struct udevice *dev)
 
        /* 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;
index d31b96a9d82b4b97ba0598ca1a756b1a0807722d..e2ac4d801dce59041d5834fa0f83de6bcdce8b56 100644 (file)
@@ -1804,7 +1804,7 @@ static int mvneta_of_to_plat(struct udevice *dev)
 
        /* 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;
index dfddac180fd7214ae5d822dfc205ebf820d74405..8c9afdf79aba5c857b4f2f5644b846ffcb37ec27 100644 (file)
@@ -4820,7 +4820,7 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port)
        }
 
        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;
        }
index 03eb51e51d585c9d6ee715f57087a93af126057b..1333a3aa7e44838162e15bd733bf74f7b4acb4da 100644 (file)
@@ -550,7 +550,7 @@ static int pic32_eth_probe(struct udevice *dev)
 
        /* 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 */
index 5a66d726cd6bb1f860aa0d7424e5ac4a5ce63505..8fec1c21e10fec3dfb37c369a22c117964c0580f 100644 (file)
@@ -1137,7 +1137,7 @@ static int qe_uec_of_to_plat(struct udevice *dev)
        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;
index f6d386bd6b8bd1a388ad2b75ffab3895de543284..5c152d6e0a5cda61b81feabfaf07577ee3103c6e 100644 (file)
@@ -679,7 +679,7 @@ int ravb_of_to_plat(struct udevice *dev)
        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;
index 04c9c2d968f17a7c3406459612c1738f44340a35..5c57e3dfcd478ad2fc408050db54a27d361bf480 100644 (file)
@@ -920,7 +920,7 @@ int sh_ether_of_to_plat(struct udevice *dev)
        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;
index 0a368c6d03a8e699d53c24a5fe48d845a20282c7..d684e60e72f9ed62c0833212bff59f0e395b2697 100644 (file)
@@ -749,7 +749,7 @@ static int ave_of_to_plat(struct udevice *dev)
        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;
index 693fd3a35db94b2c40a4b3f4f05d5be2986d4848..24caacf84706fce13df85836d1138435be70ebe7 100644 (file)
@@ -1034,7 +1034,7 @@ static int netsec_of_to_plat(struct udevice *dev)
        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,
index 5654a3430e2c8111293a2d3a1b7269bc90146b38..5943a5e3f0a81cb88e8d1bfd2b6b1ff97eebb488 100644 (file)
@@ -947,7 +947,7 @@ static int sun8i_emac_eth_of_to_plat(struct udevice *dev)
 
        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) {
index c1da33473958d543df0712d47887618e2f0c51a6..9580fa37eaffe6e5bfae5e5cd43fcf7dad12ac0b 100644 (file)
@@ -607,7 +607,7 @@ static int am65_cpsw_ofdata_parse_phy(struct udevice *dev)
        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;
        }
index 5b7bab734e468295128e5a9a37c78cc6692de290..8988c21e667261a74fbbe9273139aadc311528cd 100644 (file)
@@ -1345,7 +1345,7 @@ static int cpsw_eth_of_to_plat(struct udevice *dev)
        }
 
        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;
index b55e7da4c1820bc6a3ebe8e8200fe0819785810e..16e3f32bb0326775e6998e99f4a7ebcfea70aeb4 100644 (file)
@@ -728,7 +728,7 @@ static int ks2_eth_parse_slave_interface(int netcp, int slave,
                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;
 
index fec051ebb7c1b85188a309d5271049bb3a9a3760..d69a9ff477367cb51d7094e87df41f1c858617d1 100644 (file)
@@ -894,7 +894,7 @@ int tsec_probe(struct udevice *dev)
        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;
index 02d13c3e0ad6dc74f6b462d6357929cf31d95b9a..a4715735c3c442c8418ce9cc1e612b43f705a1bf 100644 (file)
@@ -850,7 +850,7 @@ static int axi_emac_of_to_plat(struct udevice *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;
 
                plat->eth_hasnobuf = fdtdec_get_bool(gd->fdt_blob, node,
index 0062851134d8c365c5297cb6915295ae55c079e8..cf6c53c8afb0770c8ab11a16ca0f5432aff3c4a0 100644 (file)
@@ -859,7 +859,7 @@ static int zynq_gem_of_to_plat(struct udevice *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;
        priv->interface = pdata->phy_interface;
 
index 3bd3ba492539f3c002f9de82d91d96bc3660e6c4..f27aca5877a68caa7058e1c445faf5993ef16819 100644 (file)
@@ -1239,7 +1239,7 @@ ofnode ofnode_get_phy_node(ofnode eth_node);
  * returns the corresponding PHY interface type.
  *
  * @mac_node:  ofnode containing the property
- * Return: one of PHY_INTERFACE_MODE_* constants, PHY_INTERFACE_MODE_NONE on
+ * Return: one of PHY_INTERFACE_MODE_* constants, PHY_INTERFACE_MODE_NA on
  *        error
  */
 phy_interface_t ofnode_read_phy_mode(ofnode mac_node);
index bfa26459674bc95a710b684901a45bed10956960..1b54b69acf09d6ef24a8ea9e7f0f750b06ca3444 100644 (file)
@@ -764,7 +764,7 @@ ofnode dev_get_phy_node(const struct udevice *dev);
  * returns the corresponding PHY interface type.
  *
  * @dev: device representing the MAC
- * Return: one of PHY_INTERFACE_MODE_* constants, PHY_INTERFACE_MODE_NONE on
+ * Return: one of PHY_INTERFACE_MODE_* constants, PHY_INTERFACE_MODE_NA on
  *        error
  */
 phy_interface_t dev_read_phy_mode(const struct udevice *dev);
index 44da014c66c723bcbb06c3271030ab977fc1701f..bf9570679d2e2b6c42b0bc292380502b7ac8c110 100644 (file)
@@ -72,7 +72,7 @@ enum fm_eth_type {
 #define FM_ETH_INFO_INITIALIZER(idx, pregs) \
        .fm             = idx,                                          \
        .phy_regs       = (void *)pregs,                                \
-       .enet_if        = PHY_INTERFACE_MODE_NONE,                      \
+       .enet_if        = PHY_INTERFACE_MODE_NA,                        \
 
 #ifdef CONFIG_SYS_FMAN_V3
 #define FM_DTSEC_INFO_INITIALIZER(idx, n) \
index 494bc87e6792cfd5ae7ff9bbd4f04b347c9c79e4..59e119a6399b994909a402da95798517b944d158 100644 (file)
@@ -39,7 +39,7 @@ typedef enum {
        PHY_INTERFACE_MODE_NCSI,
        PHY_INTERFACE_MODE_10GBASER,
        PHY_INTERFACE_MODE_USXGMII,
-       PHY_INTERFACE_MODE_NONE,        /* Must be last */
+       PHY_INTERFACE_MODE_NA,  /* Must be last */
 
        PHY_INTERFACE_MODE_MAX,
 } phy_interface_t;
@@ -71,7 +71,7 @@ static const char * const phy_interface_strings[] = {
        [PHY_INTERFACE_MODE_NCSI]               = "NC-SI",
        [PHY_INTERFACE_MODE_10GBASER]           = "10gbase-r",
        [PHY_INTERFACE_MODE_USXGMII]            = "usxgmii",
-       [PHY_INTERFACE_MODE_NONE]               = "",
+       [PHY_INTERFACE_MODE_NA]         = "",
 };
 
 /* Backplane modes:
@@ -86,8 +86,8 @@ static const char * const backplane_mode_strings[] = {
 static inline const char *phy_string_for_interface(phy_interface_t i)
 {
        /* Default to unknown */
-       if (i > PHY_INTERFACE_MODE_NONE)
-               i = PHY_INTERFACE_MODE_NONE;
+       if (i > PHY_INTERFACE_MODE_NA)
+               i = PHY_INTERFACE_MODE_NA;
 
        return phy_interface_strings[i];
 }
index a9c84b4b50c7792fedec380a845422eb4ce68aa7..fd52c93044b4956470fa8e28e5b1811943d99962 100644 (file)
@@ -691,7 +691,7 @@ struct vsc9953_vcap {
        .phyaddr        = 0,                                            \
        .index          = idx,                                          \
        .phy_regs       = NULL,                                         \
-       .enet_if        = PHY_INTERFACE_MODE_NONE,                      \
+       .enet_if        = PHY_INTERFACE_MODE_NA,                        \
        .bus            = NULL,                                         \
        .phydev         = NULL,                                         \
 }
index 874f59413a2685290a4a46b0f82e84a7d618b583..7593618d9adb29b1427e365c64a4a482031670fe 100644 (file)
@@ -199,8 +199,8 @@ struct phy_device *dm_eth_phy_connect(struct udevice *ethdev)
        }
 
        interface = dev_read_phy_mode(ethdev);
-       if (interface == PHY_INTERFACE_MODE_NONE)
-               dev_dbg(ethdev, "can't find interface mode, default to NONE\n");
+       if (interface == PHY_INTERFACE_MODE_NA)
+               dev_dbg(ethdev, "can't find interface mode, default to NA\n");
 
        phy = dm_eth_connect_phy_handle(ethdev, interface);