From patchwork Fri Feb 7 11:31:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1234880 X-Patchwork-Delegate: trini@ti.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; 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.a=rsa-sha256 header.s=20150623 header.b=TY90QBu6; 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 48DY6x0QqDz9sRR for ; Fri, 7 Feb 2020 22:32:08 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 589E581813; Fri, 7 Feb 2020 12:32:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; 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="TY90QBu6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4271D8181D; Fri, 7 Feb 2020 12:31:58 +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=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) (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 3B92A81812 for ; Fri, 7 Feb 2020 12:31:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-wm1-x342.google.com with SMTP id q9so2178498wmj.5 for ; Fri, 07 Feb 2020 03:31:55 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=wkO/IhP37sWwTnJX6Em9ea7KOmimNla5E+Ob+ipG4Zo=; b=TY90QBu6Do7qoqq0VF6k+EMAlPsB+1ffcEELtW9xp8hwoo1ym0QZHl86DdhM0Epari 9Qgf5+SA5S4AhpeiVaPEJErwsGiBDgVUHMw4Qxzy5yoG3Kl61eGoUshyPcYNREynIdfj 5KlZSnsbKI05R0ylo4ResKOdi8rtjIpmC6UdEQm3SP2SugnHLsx707Ei2OjdZl6/+HBc 2jB/sVPDrVjotrBjdwJ/ySNnvGdtpLuk1DzpEPMvQ15i9Gu/Rz4wGx7odabMKHsosQ8o zK1pMuOeLJwvRPZmYDjOoUViOxuopuQ5OkHJv7dLL7rZIsYsJwKshu+WZ8ivbabYhw7s aeyQ== 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 :mime-version:content-transfer-encoding; bh=wkO/IhP37sWwTnJX6Em9ea7KOmimNla5E+Ob+ipG4Zo=; b=OdEDVkbkOYfnyRczV9/8tODUCuMUTqtaWl6T8EkSesYhBmKW/D1OVJljkdlmoWZkXI FpTvn91QZPsqE/ASiqI23PTdWWTBgwdAzQt6smPDrjy1mTWZccZ+TkhciA4weHI1hvJr I3OHTjVn6WIUzkOtNAWuIxGnmauKC0/79UxHCZmNqwSy+N37jZR6pWvOTYQz7uT+Y0Zq MvWLHF2c5wA6smeUC4T5OC+PPQxCZbHzIN8TQnsYhdlZm2LElcHOuDjSjD0w1fROyiXl oRn0nOetvC7z5q7UE8oFJAESTcqAAtwN9JRcIg5dtm7t9Hb9L1kw4kNHgR81Lyrbl6VF MJjQ== X-Gm-Message-State: APjAAAUlykLiCVJIgHj1yPvA9CSeV9vROQNZTRvsEhEJeX1aRyy41wkx cm7a073t50VuJdXHR+/8IbQBeeYBBwGing== X-Google-Smtp-Source: APXvYqxi1rutmD6cc5mmLqa7il635sXKOGZFCVcI340MRI2thdflINwx/xbAXhWYi3ufSG8jdw4w9g== X-Received: by 2002:a1c:f008:: with SMTP id a8mr3906570wmb.81.1581075114337; Fri, 07 Feb 2020 03:31:54 -0800 (PST) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id n13sm3079176wmd.21.2020.02.07.03.31.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Feb 2020 03:31:53 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Subject: [PATCH] net: phy: dp83867: Do not check sgmii if rgmii is already used Date: Fri, 7 Feb 2020 12:31:52 +0100 Message-Id: <8ec19c20bf163a3734e6080179c1d4ca434d2b45.1581075110.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joe Hershberger , Trent Piepho , Carlo Caione Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean There is no reason to check sgmii branch again when it is clear that phy interface is rgmii. Signed-off-by: Michal Simek --- drivers/net/phy/dp83867.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 4d796e289c45..3178787ff1c7 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -327,9 +327,7 @@ static int dp83867_config(struct phy_device *phydev) phy_write_mmd(phydev, DP83867_DEVADDR, DP83867_RGMIIDCTL, delay); - } - - if (phy_interface_is_sgmii(phydev)) { + } else if (phy_interface_is_sgmii(phydev)) { phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, (BMCR_ANENABLE | BMCR_FULLDPLX | BMCR_SPEED1000));