From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bin Meng Date: Fri, 12 Mar 2021 21:35:45 +0800 Subject: [PATCH v2 04/21] dm: mdio: Use ofnode_phy_is_fixed_link() API In-Reply-To: <20210312133602.31105-1-bmeng.cn@gmail.com> References: <20210312133602.31105-1-bmeng.cn@gmail.com> Message-ID: <20210312133602.31105-5-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 Reviewed-by: Ramon Fried --- (no changes since v1) net/mdio-uclass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mdio-uclass.c b/net/mdio-uclass.c index 5da984ca3f..2a9533c88b 100644 --- a/net/mdio-uclass.c +++ b/net/mdio-uclass.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -140,7 +141,7 @@ static struct phy_device *dm_eth_connect_phy_handle(struct udevice *ethdev, int i; if (CONFIG_IS_ENABLED(PHY_FIXED) && - ofnode_valid(dev_read_subnode(ethdev, "fixed-link"))) { + ofnode_phy_is_fixed_link(dev_ofnode(ethdev), NULL)) { phy = phy_connect(NULL, -1, ethdev, interface); goto out; } -- 2.25.1