From patchwork Mon Jan 21 09:13:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 156183 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp6156568jaa; Mon, 21 Jan 2019 01:15:39 -0800 (PST) X-Google-Smtp-Source: ALg8bN48OcJeZy9yqy5OXSob4k5LsuK1yWiOMfG90sfb8cI91EmmUM5XsBXGH/IXK3q1S10ygOVb X-Received: by 2002:a63:e21:: with SMTP id d33mr27345784pgl.272.1548062139763; Mon, 21 Jan 2019 01:15:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548062139; cv=none; d=google.com; s=arc-20160816; b=KiL9HakhbrkqRtxdBKyUqGLar8HT/TmfrRYwk93WevMmyyM8k3jiMtBTnucvcka1my wWfXHBwKmT6zE4fmn/Nzcuh9j6pgpAi/Wcu47/bpmNoWcO54HG1HPs7UYW72r90EQ50/ 2oangBWArfGqqk7l2U4yRsSWzK5SSOO16BufQcWiU5l8FkO87DDVvn7mhJx4u5/sv4G4 J5Lrd2cj+M+KjE1ZefMlU1OVt79tsy2CRu37PN9OD94o0u10oZq2f7tX3u1T4y8lTqpK vaUcmJflMgskXYZRkcEppk1A/YKv4eDnvMQ2MxGtPClQz9sxDLGdtE3NPTuqkYmGVp0G VzDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RE8Y9dl3ceLzQnANtqjC9MPz9jxROCTrlIi7ue3Hmbs=; b=UdXZCVZix3o26DKMyr8g8XahD3rC5Kxa7Qn00KXNrNpBi95wczpmQG+OsbCAK8Ki92 Q7gbMX7qRaAMEUFx5wh4HVI+1y6qsVLPkdYQn2copY2xlwZLWutMZqfNLV9OYkXjHAjl 2hIMUJkPjyW8hToovaujQI2VFxXrDM4VSLqFEzjt8VZPpETC8682YzjVoTZnBiN8CKx7 a7ZeI9pDQoSwP7EQMG+hesXN7DtfaiNa9Ccq2LOIPQ4mQajHPCFA6sewahwyv3CJ5PLp S4kRqc3w2Sd2R2Dcqfi1B+zr3r8R6YkSYNxjY2KW9sToppZsfxxk6lpNya/MdiwlXoAd u1wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="fSAaFY/f"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a12si12865208pll.112.2019.01.21.01.15.39; Mon, 21 Jan 2019 01:15:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="fSAaFY/f"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727622AbfAUJPi (ORCPT + 15 others); Mon, 21 Jan 2019 04:15:38 -0500 Received: from mail.kernel.org ([198.145.29.99]:49980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbfAUJPg (ORCPT ); Mon, 21 Jan 2019 04:15:36 -0500 Received: from localhost.localdomain (unknown [122.178.235.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 983FD2084A; Mon, 21 Jan 2019 09:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548062136; bh=4wfRImCxJDZDFzTbyJGiJL0Y9473cOcMB1rZVP3hZ3s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fSAaFY/fyTd2Id1OFt4idPhuXBcuFxkCgcz3WGW9lYOUX1hik9U5uRZxFqIb/QGox ufSeQnXhxZwlT/wJTkSRgHVW8IOJNOd6KWuyxlQSxFpZWSsmEbtiKKQuE/53oO7Abs 8kYDOxOzrf7SHJF4p0N7sNLXL/nkntHy4YkjlqgI= From: Vinod Koul To: David S Miller Cc: netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, Niklas Cassel , Bjorn Andersson , Vinod Koul , Andrew Lunn , Florian Fainelli Subject: [PATCH v3 5/5] net: dsa: qca8k: disable delay for RGMII mode Date: Mon, 21 Jan 2019 14:43:18 +0530 Message-Id: <20190121091318.20079-6-vkoul@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121091318.20079-1-vkoul@kernel.org> References: <20190121091318.20079-1-vkoul@kernel.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org In RGMII mode we should not have any delay in port MAC, so disable the delay. Signed-off-by: Vinod Koul --- drivers/net/dsa/qca8k.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) -- 2.20.1 diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index 7e97e620bd44..a4b6cda38016 100644 --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8k.c @@ -420,7 +420,7 @@ qca8k_mib_init(struct qca8k_priv *priv) static int qca8k_set_pad_ctrl(struct qca8k_priv *priv, int port, int mode) { - u32 reg; + u32 reg, val; switch (port) { case 0: @@ -439,17 +439,9 @@ qca8k_set_pad_ctrl(struct qca8k_priv *priv, int port, int mode) */ switch (mode) { case PHY_INTERFACE_MODE_RGMII: - qca8k_write(priv, reg, - QCA8K_PORT_PAD_RGMII_EN | - QCA8K_PORT_PAD_RGMII_TX_DELAY(3) | - QCA8K_PORT_PAD_RGMII_RX_DELAY(3)); - - /* According to the datasheet, RGMII delay is enabled through - * PORT5_PAD_CTRL for all ports, rather than individual port - * registers - */ - qca8k_write(priv, QCA8K_REG_PORT5_PAD_CTRL, - QCA8K_PORT_PAD_RGMII_RX_DELAY_EN); + /* RGMII mode means no delay so don't enable the delay */ + val = QCA8K_PORT_PAD_RGMII_EN; + qca8k_write(priv, reg, val); break; case PHY_INTERFACE_MODE_SGMII: qca8k_write(priv, reg, QCA8K_PORT_PAD_SGMII_EN);