From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Tue, 2 Mar 2021 23:34:40 +0800 Subject: [PATCH 09/20] net: tsec: Use ofnode_phy_is_fixed_link() API In-Reply-To: <20210302153451.19440-1-bmeng.cn@gmail.com> References: <20210302153451.19440-1-bmeng.cn@gmail.com> Message-ID: <20210302153451.19440-10-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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 #include #include +#include #include #include #include @@ -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