Switch to use the ofnode_phy_is_fixed_link() API which can support
both the new and old DT bindings.

Signed-off-by: Bin Meng <bmeng...@gmail.com>
---

 drivers/net/tsec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index ec48689372..24f9962b82 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -15,6 +15,7 @@
 #include <command.h>
 #include <tsec.h>
 #include <fsl_mdio.h>
+#include <dm/of_extra.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
@@ -707,8 +708,7 @@ static int init_phy(struct tsec_private *priv)
                tsec_configure_serdes(priv);
 
 #if defined(CONFIG_DM_ETH) && defined(CONFIG_DM_MDIO)
-       if (ofnode_valid(ofnode_find_subnode(dev_ofnode(priv->dev),
-                                            "fixed-link")))
+       if (ofnode_phy_is_fixed_link(dev_ofnode(priv->dev), NULL))
                phydev = phy_connect(NULL, 0, priv->dev, priv->interface);
        else
                phydev = dm_eth_phy_connect(priv->dev);
-- 
2.25.1

Reply via email to