From patchwork Sun Jul 2 12:31:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9821129 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 26A3360246 for ; Sun, 2 Jul 2017 12:35:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1593B281F9 for ; Sun, 2 Jul 2017 12:35:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0762928503; Sun, 2 Jul 2017 12:35:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4DE9F281F9 for ; Sun, 2 Jul 2017 12:35:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=pvTU8twCAqO9KMJeVpnifOcoACRBbHpjUKjAJByfJW4=; b=MPJswLiCoSg87yzl3SwL004ZNk KAE+MP/f7jmWhUW8IQs6ixLdttL4tX3ntW7Jc3/Mz91hXMLrDJHPxIuEBBZiLcBP6MetzVP7yECqv Y1EZPrAdaHQcJGmhJeYWmPdGAAiEXAFSpqky+8pgeo9Ogo6IoUnbv07Bf3+nQeg7MVrzp6z6TiJPr tiVr/dAs/rOqbIok3RDl80biV8r35LldIrR4CFwRztnAJj15MeaZxC8hfLk5vFyzi0lvI+JADUhja oCoNAZAVjEpsSovEOMzDbPaTKkWmms3WuCWz8Y87YI+vnJpkDidDCvv9YATl7gLhIWCDvFe6Pi6tM XOto+4sQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dRe6M-00045Q-5K; Sun, 02 Jul 2017 12:35:46 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dRe59-00025m-04 for linux-arm-kernel@lists.infradead.org; Sun, 02 Jul 2017 12:34:32 +0000 Received: by mail-wm0-x244.google.com with SMTP id u23so15726685wma.2 for ; Sun, 02 Jul 2017 05:34:13 -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; bh=93IlePWT7rUqhfnSadz9SsrVv7k06sJAoGW4ILcrLNw=; b=V2MDpOmX1GIE2OXhA3EVno6NypKE1tVYrnJnn2H/2d1hsdNDadskzr0+w/ZTFQ1fTB aKJh6iiwlLjBBWWEle6yl+pRbNgcjOsnmEe7tVP6irLP1EhzeXUBqslqeJ6/prFtv9f0 uLLS2Btw/p9BGtjCmJ80oiewOfcfBpUERULSf/8Cb5iYlIhHBGBOCMh1XumgpyeKuG9j 9TxJ/WlbrM1stfL5WcqF+PBhQss7frVdvQaYj0rCSZN/Fcyu4yCY+ekPwMUh51BvJIbd DwiiHDEDNDh7FEnH0Gbe5CuraFvo1JmyjDvbnj948FyCLzxjyWwpDW9nK9nNg2DxBb1S QQtA== 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; bh=93IlePWT7rUqhfnSadz9SsrVv7k06sJAoGW4ILcrLNw=; b=E1GEsUl3b02A5JsQqi/XXGRn0lwBemCYf9642PxIxMWu6e7Dkg8L0igLe5onks4CAx mTSlxeh3QxAx+5fv1NWaMImA4LJaEtf+D7GUsYV13z4b90ZbBh0mIJOXFBqOEgwjG8KO GY0MhNsoHPOy2MqFwxsFJK8uINQP7J8ZCtPfwXoJPhj3MqpibSty0QkJyAk9lpUaGhIZ LZ1qBMwdNt1eJ+mQHwwN9PVzbSE2OhIOrFgkbvEtIL80CmQdz0WrJZ1MsrAN65wV3nCd dNrqnVNtoTYeODUQZgh1lfL5oNFrUaA2G/QZ2h0QaN7NIEzCp73UdJqwkkBX9Rg4Y9FZ 6PTA== X-Gm-Message-State: AKS2vOx/nUTAYIXMKuDdBBBtODQeJhS8CtliJEJUM81Auqd3PuVHnHH6 WGC4NqWMkSFXiw== X-Received: by 10.28.105.28 with SMTP id e28mr11406823wmc.42.1498998852107; Sun, 02 Jul 2017 05:34:12 -0700 (PDT) Received: from Red.local (LFbn-1-7035-57.w90-116.abo.wanadoo.fr. [90.116.208.57]) by smtp.googlemail.com with ESMTPSA id z75sm2533855wmz.8.2017.07.02.05.34.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 02 Jul 2017 05:34:11 -0700 (PDT) From: Corentin Labbe To: robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, wens@csie.org, peppe.cavallaro@st.com, alexandre.torgue@st.com, andre.przywara@arm.com Subject: [PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode" Date: Sun, 2 Jul 2017 14:31:59 +0200 Message-Id: <20170702123159.6939-7-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170702123159.6939-1-clabbe.montjoie@gmail.com> References: <20170702123159.6939-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170702_053431_196560_DAEC8505 X-CRM114-Status: GOOD ( 11.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since internal phy-mode is reserved for non-xMII protocol we cannot use it with dwmac-sun8i This reverts commit 1c2fa5f84683 ("net: stmmac: support future possible different internal phy mode") Signed-off-by: Corentin Labbe --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c index 6c2d1da05588..fffd6d5fc907 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c @@ -638,7 +638,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv) { struct sunxi_priv_data *gmac = priv->plat->bsp_priv; struct device_node *node = priv->device->of_node; - int ret, phy_interface; + int ret; u32 reg, val; regmap_read(gmac->regmap, SYSCON_EMAC_REG, &val); @@ -718,11 +718,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv) if (gmac->variant->support_rmii) reg &= ~SYSCON_RMII_EN; - phy_interface = priv->plat->interface; - /* if PHY is internal, select the mode (xMII) used by the SoC */ - if (gmac->use_internal_phy) - phy_interface = gmac->variant->internal_phy; - switch (phy_interface) { + switch (priv->plat->interface) { case PHY_INTERFACE_MODE_MII: /* default */ break; @@ -936,7 +932,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev) } plat_dat->interface = of_get_phy_mode(dev->of_node); - if (plat_dat->interface == PHY_INTERFACE_MODE_INTERNAL) { + if (plat_dat->interface == gmac->variant->internal_phy) { dev_info(&pdev->dev, "Will use internal PHY\n"); gmac->use_internal_phy = true; gmac->ephy_clk = of_clk_get(plat_dat->phy_node, 0);