From patchwork Sun Mar 14 12:14:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 1452664 X-Patchwork-Delegate: priyanka.jain@nxp.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=fvVycXtz; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dyz6k4lP9z9sRR for ; Sun, 14 Mar 2021 23:16:14 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 01C6C828FB; Sun, 14 Mar 2021 13:15:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fvVycXtz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0AB4C828F4; Sun, 14 Mar 2021 13:15:30 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2AB7682829 for ; Sun, 14 Mar 2021 13:15:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bmeng.cn@gmail.com Received: by mail-pl1-x629.google.com with SMTP id w7so10474471pll.8 for ; Sun, 14 Mar 2021 05:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/PZkViSsdHxlR8FKPcvfWMw0v2XAUKL/uimPYKmIwkE=; b=fvVycXtzOzk1frij1P5XuMSilSDOfmhgr+2oSaZ4sfkwhritQKZ/3hu1xA81pXUv5k KfBmAdHEPRKfxdGnV6XZIkgfPq13sBI/tisUDtLM6k6UrDreOkpyLPgESxxcscdHI3uq BZ0r1IA2msV5rgwlwkqatrEflEt15cX3n2duQ1hzYUCPhSXh+SIx3n2XLu5DW+/ClwCT BUYrKo+YTR8QquPFpR2NLVJvIFKhR2XkcS1+MmauBxlJIhFpuDKcdG+5ClIsagmx95nV GQDmePG9FYmkckaz1Vxvgtqw6TDys7hP4RJyeUTBow1I1jnX5DOORN8PiXHVLjVPyY7N C1/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/PZkViSsdHxlR8FKPcvfWMw0v2XAUKL/uimPYKmIwkE=; b=nYJUkVXWviH3HbEDPKuX+7g7Cm2HhSk0X8VcgkAw1nVTqoSftqgXC0WB7KYpr43x00 s/SK35DkClhQYeQCIumfuOVpCtkvXdnK9RA5pd0UjLD0XXyRJOJf8gQuHc4LYQjHx2DJ jv8ZvkEtLx7m/xOQkiim7Mp5Cac05dUvNMgd+VoguvvIJ6Z1lBwG+J1H6i2rGX4ZbIKF VLyfurjgVeJkiJBt0F1tgNdkEdFvet5BqqI8bLm9JKGfYsKIM+jGW97O25vXuIdgDFn8 BW/eHmGfGOeVTuk10ewSP55WZ0RjL2KN0KT7TiJMmDl7pzu0eL+ra9hNTdrfzU+4iz0t j4yQ== X-Gm-Message-State: AOAM533lRzy/sTOqHDmoE+7i5meLFHtzZyttMHey8cSZagezloQsxXKK svWzkHtoKZSj8w9zOWZjcb4= X-Google-Smtp-Source: ABdhPJwEgkFzEOmZaPgdhBz6GQe973hCX3mGAZ342aSVJeBZSRnhf6HqtW3DwC4iuYG+0a/CsTo5Sg== X-Received: by 2002:a17:90a:ff0f:: with SMTP id ce15mr7924946pjb.15.1615724124616; Sun, 14 Mar 2021 05:15:24 -0700 (PDT) Received: from i9-aorus-gtx1080.localdomain (144.168.56.201.16clouds.com. [144.168.56.201]) by smtp.gmail.com with ESMTPSA id 2sm10504325pfi.116.2021.03.14.05.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 05:15:24 -0700 (PDT) From: Bin Meng To: Priyanka Jain , Ramon Fried , Simon Glass , u-boot@lists.denx.de Cc: Tom Rini , Vladimir Oltean , Bin Meng Subject: [PATCH v4 03/22] dm: mdio: Use ofnode_phy_is_fixed_link() API Date: Sun, 14 Mar 2021 20:14:47 +0800 Message-Id: <20210314121506.18303-4-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210314121506.18303-1-bmeng.cn@gmail.com> References: <20210314121506.18303-1-bmeng.cn@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean 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 Reviewed-by: Vladimir Oltean --- (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; }