From patchwork Fri Apr 15 12:27:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 65907 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1150962qge; Fri, 15 Apr 2016 05:28:53 -0700 (PDT) X-Received: by 10.28.13.141 with SMTP id 135mr4398849wmn.12.1460723333797; Fri, 15 Apr 2016 05:28:53 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id k10si50344675wjn.38.2016.04.15.05.28.53; Fri, 15 Apr 2016 05:28:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C4633A75C9; Fri, 15 Apr 2016 14:28:16 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nFhlX0GUmu0l; Fri, 15 Apr 2016 14:28:16 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3576BA7646; Fri, 15 Apr 2016 14:27:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3B438A75F2 for ; Fri, 15 Apr 2016 14:27:37 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HhLeGbsfA86H for ; Fri, 15 Apr 2016 14:27:37 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by theia.denx.de (Postfix) with ESMTPS id A8E98A74DB for ; Fri, 15 Apr 2016 14:27:29 +0200 (CEST) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u3FCRRhU031868; Fri, 15 Apr 2016 07:27:27 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u3FCRQfI017078; Fri, 15 Apr 2016 07:27:26 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Fri, 15 Apr 2016 07:27:26 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u3FCRQmE016578; Fri, 15 Apr 2016 07:27:26 -0500 Received: from localhost (a0272616local.am.dhcp.ti.com [172.22.146.61]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id u3FCRQ925757; Fri, 15 Apr 2016 07:27:26 -0500 (CDT) From: Dan Murphy To: Date: Fri, 15 Apr 2016 07:27:22 -0500 Message-ID: <1460723242-20805-7-git-send-email-dmurphy@ti.com> X-Mailer: git-send-email 2.7.2.333.g70bd996 In-Reply-To: <1460723242-20805-1-git-send-email-dmurphy@ti.com> References: <1460723242-20805-1-git-send-email-dmurphy@ti.com> MIME-Version: 1.0 Cc: joe.hershberger@ni.com, trini@konsulko.com, michal.simek@xilinx.com Subject: [U-Boot] [PATCH v6 7/7] net: phy: dp83867: Add SGMII helper for configuration X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 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" The code assumed that if the interface is not RGMII configured then it must be SGMII configured. This device has the ability to support most of the MII interfaces. Therefore add the helper for SGMII and only configure the device if the interface is configured for SGMII. Signed-off-by: Dan Murphy Reviewed-by: Mugunthan V N Reviewed-by: Michal Simek --- v6 - No changes - https://patchwork.ozlabs.org/patch/608767/ drivers/net/phy/ti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.8.1.116.g7b0d47b _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c index 4c19353..c55dd97 100644 --- a/drivers/net/phy/ti.c +++ b/drivers/net/phy/ti.c @@ -221,7 +221,7 @@ static int dp83867_config(struct phy_device *phydev) (dp83867->fifo_depth << DP83867_PHYCR_FIFO_DEPTH_SHIFT)); if (ret) goto err_out; - } else { + } else if (phy_interface_is_sgmii(phydev)) { phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, (BMCR_ANENABLE | BMCR_FULLDPLX | BMCR_SPEED1000));