From patchwork Sat Jul 30 00:33:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iyappan Subramanian X-Patchwork-Id: 9253009 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 05CA66075F for ; Sat, 30 Jul 2016 00:37:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA6F6283A6 for ; Sat, 30 Jul 2016 00:37:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DEE3528444; Sat, 30 Jul 2016 00:37:06 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8D7A9283A6 for ; Sat, 30 Jul 2016 00:37:06 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bTIFb-0000WH-K8; Sat, 30 Jul 2016 00:35:35 +0000 Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bTIDu-0006aj-J8 for linux-arm-kernel@lists.infradead.org; Sat, 30 Jul 2016 00:33:52 +0000 Received: by mail-pf0-x22b.google.com with SMTP id y134so37069540pfg.0 for ; Fri, 29 Jul 2016 17:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apm.com; s=apm; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=W7IoN71r7jOOx/IpIZJ7UHvmNl05gbNAFKXgPX2wX18=; b=OvlR0HfNF+4WO8po/XMuh2kDgO/SbphVubXqLAqacj4wedt5AAxvcnWg+1kxgnJp4o YPmqbFsFkpwwt7HqSU9oI3vvKahukca+xEiBsZNXrD0sotGJvM3xPzUC042pWibcWz/F /iSvW9fpZKLxM0KOOrm8msHAXzOis6GTXKNIE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=W7IoN71r7jOOx/IpIZJ7UHvmNl05gbNAFKXgPX2wX18=; b=eLiMJ0VDAvJDXsSNf/vhUf2Rd08KM5njCirCFOA83bv1iPJSgO4Cwya6RfAyYPf7Ip /kEQmSdBcHUVKl7rmicOsVyOkDDqEPJbuAm7UhiQ50Rqx/BzeDJJ/GtWvzYTOFS8LY4R vQaj03AqgEmR7UYS8cbHX4VMnnSOhWVXOBhP3xKzE+Hpn4XZk/j6ZsKsT3NZGa01rwq5 R01me1k9SDf/w0/211171WSiKAuqDr+i7hpfMyF5wPgM5uG9S9SYUbmaWxhXOUTOp2Er zYfmFzKLL70YaiKbFWJ1wsa04xeKyHuxCFufcq3VizDd6Kn8J68olAYypyVt5rl8l3PK CTrQ== X-Gm-Message-State: AEkoouuVksDK85ihqBDirsLHqbFv1fz46j9FKxI0yNn5yjsws4WpZ30frGn1TT4DHRkIa/0e X-Received: by 10.98.34.66 with SMTP id i63mr73426798pfi.130.1469838809931; Fri, 29 Jul 2016 17:33:29 -0700 (PDT) Received: from isubrama-dev.amcc.com ([206.80.4.98]) by smtp.gmail.com with ESMTPSA id o2sm27724157pfg.10.2016.07.29.17.33.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Jul 2016 17:33:29 -0700 (PDT) From: Iyappan Subramanian To: davem@davemloft.net, netdev@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH net-next 06/10] drivers: net: xgene: Change port init sequence Date: Fri, 29 Jul 2016 17:33:59 -0700 Message-Id: <1469838843-19943-7-git-send-email-isubramanian@apm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469838843-19943-1-git-send-email-isubramanian@apm.com> References: <1469838843-19943-1-git-send-email-isubramanian@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160729_173350_821147_49C9F6BA X-CRM114-Status: UNSURE ( 9.80 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patches@apm.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, Iyappan Subramanian 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 This patch rearranges the port initialization sequence as recommended by hardware specification. This patch also removes, mac_init() call from xgene_enet_link_state(), as it was not required. Signed-off-by: Iyappan Subramanian Tested-by: Fushen Chen --- drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c index 9c6ad0d..d53c053 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_xgmac.c @@ -216,12 +216,12 @@ static void xgene_xgmac_init(struct xgene_enet_pdata *pdata) data |= CFG_RSIF_FPBUFF_TIMEOUT_EN; xgene_enet_wr_csr(pdata, XG_RSIF_CONFIG_REG_ADDR, data); - xgene_enet_wr_csr(pdata, XG_CFG_BYPASS_ADDR, RESUME_TX); - xgene_enet_wr_csr(pdata, XGENET_RX_DV_GATE_REG_0_ADDR, 0); xgene_enet_rd_csr(pdata, XG_ENET_SPARE_CFG_REG_ADDR, &data); data |= BIT(12); xgene_enet_wr_csr(pdata, XG_ENET_SPARE_CFG_REG_ADDR, data); xgene_enet_wr_csr(pdata, XG_ENET_SPARE_CFG_REG_1_ADDR, 0x82); + xgene_enet_wr_csr(pdata, XGENET_RX_DV_GATE_REG_0_ADDR, 0); + xgene_enet_wr_csr(pdata, XG_CFG_BYPASS_ADDR, RESUME_TX); } static void xgene_xgmac_rx_enable(struct xgene_enet_pdata *pdata) @@ -366,7 +366,6 @@ static void xgene_enet_link_state(struct work_struct *work) if (link_status) { if (!netif_carrier_ok(ndev)) { netif_carrier_on(ndev); - xgene_xgmac_init(pdata); xgene_xgmac_rx_enable(pdata); xgene_xgmac_tx_enable(pdata); netdev_info(ndev, "Link is Up - 10Gbps\n");