From patchwork Sat Mar 16 11:43:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1057355 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="zLjKQ49+"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44M0vV2yNHz9ryj for ; Sat, 16 Mar 2019 22:43:32 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 2C969C21E2C; Sat, 16 Mar 2019 11:43:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4C710C21C2C; Sat, 16 Mar 2019 11:43:24 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4046BC21C2C; Sat, 16 Mar 2019 11:43:23 +0000 (UTC) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by lists.denx.de (Postfix) with ESMTPS id ACACBC21C27 for ; Sat, 16 Mar 2019 11:43:22 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id i8so12191410wrm.0 for ; Sat, 16 Mar 2019 04:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id; bh=aZoaY6jZctwYH+QT59bjwrgcyVN3zNvMuto5tI+neZw=; b=zLjKQ49+PAvqwv/ggMBD6uzDR/s7oPVa/Ako/rAgl0D8B2N3YBHyIHcT86yKAhPIve Os0ad9nb7wnnmTmiaEomG49PYW8sNvGlyZ61qZc+iqbKjLoGfrw8vo1hdJ3p07KvN87L YOdqntDXmvDY6qqIT+6bsM0rE3idfKAITQP3951dWTKiHShsuq8zKcU1CVp1HfsRVPNo 2QBHEfn9f9nkKercL+8M7bkeNQnTftSSnFxa8aPAlizGjH3bvyLhO055dcjIVIZwIrUH vCtNepw9PgT/3NTirL15ngmXfNdfsDmg9/NVl4daWF5WK0M+wXr9agh9jejUejBWnqwU ZulQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=aZoaY6jZctwYH+QT59bjwrgcyVN3zNvMuto5tI+neZw=; b=NhxcUO9GaicT6nffQsgXWiY0RbWWbYAaxdmVbsouj4t3XLs5CwqJZVTnIY80uBuygY mkGNbvTd7xJT93QCdjI/ULtf/NXF4awnA4yYO4IJL9BVumBQgGUgBXGm8nWCGbsmAahH 1o1gX9oK5PXW+JTAtHrjv71kd1kRIz3HwY2+lMTny7aJpHgDJuM2dcZej98/LYFXv0rp iBMtwmCtlZQ0O3xnDfA96I2BFVToGC9FKTbuxRpmqLW+tsUvcDvhbJNW+BjFU/2/YjwW NUxPXzxlkg/dxjk69pq7UFTD70BsFB6TP/AVutuCG8wwfQMEs39jFXe5CFE7oIkLn2Kw DJ0Q== X-Gm-Message-State: APjAAAWltoPYGb+p32O67awQQ5rbfjMmpcEyon0V+H/6wfj1MkTt7Oxq ufwAHzIf/ffnn8J9B5x8tgnoTr++90pcqw== X-Google-Smtp-Source: APXvYqzTpGx/63ZhAE7T8KJC1upbhbsEdvKwE3/tg0W2U+kAr8P0NaFi2UevyquhD5Ci534yM6b/tA== X-Received: by 2002:a5d:6b4c:: with SMTP id x12mr5698976wrw.14.1552736601969; Sat, 16 Mar 2019 04:43:21 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id c8sm3751714wrx.6.2019.03.16.04.43.21 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 16 Mar 2019 04:43:21 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de Date: Sat, 16 Mar 2019 12:43:17 +0100 Message-Id: <907e06a879d9ec7b36882d8c6f1e5ff8aee19c67.1552736591.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 Cc: Janine Hagemann , Joe Hershberger , Hannes Schmelzer Subject: [U-Boot] [PATCH] phy: ti: Init node before reading X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" There is a need to fill node before clk_output_sel is setup. Signed-off-by: Michal Simek Acked-by: Siva Durga Prasad Paladugu Reviewed-by: --- drivers/net/phy/ti.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c index 6db6edd0d0c8..10989dd40309 100644 --- a/drivers/net/phy/ti.c +++ b/drivers/net/phy/ti.c @@ -216,6 +216,10 @@ static int dp83867_of_init(struct phy_device *phydev) /* Optional configuration */ + node = phy_get_ofnode(phydev); + if (!ofnode_valid(node)) + return -EINVAL; + /* * Keep the default value if ti,clk-output-sel is not set * or to high @@ -225,10 +229,6 @@ static int dp83867_of_init(struct phy_device *phydev) ofnode_read_u32_default(node, "ti,clk-output-sel", DP83867_CLK_O_SEL_REF_CLK); - node = phy_get_ofnode(phydev); - if (!ofnode_valid(node)) - return -EINVAL; - if (ofnode_read_bool(node, "ti,max-output-impedance")) dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX; else if (ofnode_read_bool(node, "ti,min-output-impedance"))