Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2108958ybe; Thu, 12 Sep 2019 04:47:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJQV5BJQsGJ3yNnbgtqoJ5Xl47Dv4ybnpUUqEIIoVmZftrZPlFtiUe3W+7MnFmX1meHpPU X-Received: by 2002:a17:906:f0d5:: with SMTP id dk21mr33358882ejb.118.1568288849050; Thu, 12 Sep 2019 04:47:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568288849; cv=none; d=google.com; s=arc-20160816; b=vQp0VlmYZxoakhG2A4I50TEO+C/Zya7FAEiEbvmI6FYbuAUMuhuLqhUM6hJxnHcoY6 lAUd8AOpZP1ZXUyyQ4uc2m+LBJj24ZyGS3U0O891UEhEjHT7rei+3T4hK5ne5KWZhxlV 5F+bHBBSvORcr6/xJVn+HSN7luwlldVfMO0ujYnUY6/XFvX9GxxbPV32fLNwGHAfD+lz aTAD9Nn/XzZ6zbUjIIH16gi6OtSdZP6pcffMa1cnoU5g1IsWHlCPp4YDIW3aFME8w7yO zfLSf+kjtUp4Lx1KGN3NxMUdEBwrKITz007b323rRkVYmvZkNr9jsDQ2BYPl7vAffqM5 QvEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :thread-index:content-transfer-encoding:mime-version:message-id:date :subject:in-reply-to:cc:to:from:dkim-signature:dkim-filter; bh=vMENaR9B8BHnzZviypx8NCdd3+Dx8BLuVaaHmhNr/ho=; b=ji+bzNJHEQai0nXB3ExEEjvN60EnBSjMNSK2ONzXwnjNr3bYy0Q7zGH/J+5lb6eTJV G9Zn4fR1muT1E3lQ3tt5EZxxIbtUhFMiwvgEi3ocFylNmfS8TFFckcBfkBPB2/fCPyXR i1bua57htoMWjvIQWWlfpKtghXXDcQdnldOZvNpejveYA4TdmUhQ2YWUhtnqoQeC+msF zQDcRKA/uRBw2eUJawdF0BG2gXufWGtLNfahhn1J5birlbaYtzX9kYd/4/PhrrcqH3uL 6Dg8Mm9w3ZKZn2jT7SQb/9r/dahylCTWQSNH4ejZp8LAsF7Vqg8uTPW5lkWVbq1lV5R4 UhqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=pwZQOAaS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8si12487699ejq.283.2019.09.12.04.47.04; Thu, 12 Sep 2019 04:47:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@samsung.com header.s=mail20170921 header.b=pwZQOAaS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731420AbfILLpC (ORCPT + 99 others); Thu, 12 Sep 2019 07:45:02 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:25255 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730268AbfILLpC (ORCPT ); Thu, 12 Sep 2019 07:45:02 -0400 Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20190912114459epoutp0254a259ad86fb3f05085560a58497b003~DrkNOg_Ak0568605686epoutp02d for ; Thu, 12 Sep 2019 11:44:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20190912114459epoutp0254a259ad86fb3f05085560a58497b003~DrkNOg_Ak0568605686epoutp02d DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1568288699; bh=vMENaR9B8BHnzZviypx8NCdd3+Dx8BLuVaaHmhNr/ho=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=pwZQOAaS0CLHI0ZbPKYTqjhCyK7fP2RfKS6gydjlNLDHHu93aFtveg/nUI1sPfL7f mHMHWsFFjaNTVROrGhdj5ThenfspB+GFysFcAKWJkLNxFodnFsYNNge+p4hWoz5Va6 G0heW3xlYwM7LqabfPH+CNYvySLrlDgCcWb910JQ= Received: from epsmges5p1new.samsung.com (unknown [182.195.42.73]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20190912114458epcas5p4e3b6a74007c7b6ff108ce910587ff60f~DrkMVmcUZ1345913459epcas5p4C; Thu, 12 Sep 2019 11:44:58 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id B9.A3.04150.ABF2A7D5; Thu, 12 Sep 2019 20:44:58 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20190912114457epcas5p3583f05a2afb308b54f44ace2cc803e60~DrkLhIta92662026620epcas5p39; Thu, 12 Sep 2019 11:44:57 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190912114457epsmtrp1436d255d8900f29a80d1aa24a9b4479f~DrkLgYaQQ1846618466epsmtrp1U; Thu, 12 Sep 2019 11:44:57 +0000 (GMT) X-AuditID: b6c32a49-a5bff70000001036-0a-5d7a2fba1418 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id BA.0D.03706.9BF2A7D5; Thu, 12 Sep 2019 20:44:57 +0900 (KST) Received: from pankajdubey02 (unknown [107.111.85.21]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190912114456epsmtip1bd2ed9030e341c49ccd64436466d31f4~DrkKOnUEA0370503705epsmtip1f; Thu, 12 Sep 2019 11:44:56 +0000 (GMT) From: "Pankaj Dubey" To: "'Andrew Murray'" Cc: , , "'Jingoo Han'" , , , "'Bjorn Helgaas'" , "'Anvesh Salveru'" In-Reply-To: <20190911092710.GO9720@e119886-lin.cambridge.arm.com> Subject: RE: [PATCH 2/2] PCI: dwc: Add support to disable equalization phase 2 and 3 Date: Thu, 12 Sep 2019 17:14:53 +0530 Message-ID: <23be01d5695f$804e4380$80eaca80$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQG9FaICAAHvETL7ZYFipwvZlNiGfgIRhyJ4AoVEedEBndD0KAGBf8IBAaGhC6KnDdVyQA== Content-Language: en-us X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCKsWRmVeSWpSXmKPExsWy7bCmhu4u/apYgz0dwhbN/7ezWpzdtZDV YklThsWuux3sFiu+zGS3uLxrDpvF2XnH2Sze/H7B7sDhsWbeGkaPnbPusnss2FTq0bdlFaPH lv2fGT0+b5ILYIvisklJzcksSy3St0vgyljUWlywW6ai/d1O9gbGr6JdjJwcEgImEns777F0 MXJxCAnsZpT4OWMfE4TziVGibeF3NgjnG6NE74NJ7DAty05dZ4dI7GWU6N94Car/NaPEgZ7d YFVsAvoS537MYwWxRQR0Jb6ues4GYjML/GOUmHfUEMTmFHCSmL/3AFhcWCBM4tqJVYwgNouA qsTyxVvBenkFLCVerO2HsgUlTs58wgIxR15i+9s5zBAXKUj8fLoMaleYxJ3jWxkhasQlXh49 AnaphMBnNokjhz4DFXEAOS4Sf7bzQfQKS7w6vgXqMymJl/1tUHa+xI/Fk5ghelsYJSYfn8sK kbCXOHBlDgvIHGYBTYn1u/QhdvFJ9P5+wgQxnleio00I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WJP2E5uEOFs /GChwCJyo+nOjDvyTUoHFsuFVP+ZeqyjR3Lzvrj5RstevJyzosipYJvp+VCpY4mV+/keJIhN 8Ai0WvDylN3/zdVPui7y3glNX/OtvadCqkGJIddWU4Bff/3fW6t5OJbbl8deVXmyesFpv1ZN i6yirb3JSizFGYmGWsxFxYkABGnTh6kCAAA= X-CMS-MailID: 20190912114457epcas5p3583f05a2afb308b54f44ace2cc803e60 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P X-CMS-RootMailID: 20190910122520epcas5p1faeb16f7c38ee057ce93783a637e6bf4 References: <1568118302-10505-1-git-send-email-pankaj.dubey@samsung.com> <1568118302-10505-2-git-send-email-pankaj.dubey@samsung.com> <20190910140502.GL9720@e119886-lin.cambridge.arm.com> <20190911092710.GO9720@e119886-lin.cambridge.arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Andrew Murray > > On Tue, Sep 10, 2019 at 09:51:41PM +0530, Pankaj Dubey wrote: > > On Tue, 10 Sep 2019 at 19:59, Andrew Murray > wrote: > > > > > > On Tue, Sep 10, 2019 at 05:55:02PM +0530, Pankaj Dubey wrote: > > > > From: Anvesh Salveru > > > > > > > > In some platforms, PCIe PHY may have issues which will prevent > > > > linkup to happen in GEN3 or high speed. In case equalization > > > > fails, link will fallback to GEN1. > > > > > > > > Designware controller gives flexibility to disable GEN3 > > > > equalization completely or only phase 2 and 3. > > > > > > Do some platforms have issues conducting phase 2 and 3 when they > > > successfully conduct phase 0 and 1? > > > > > > > Yes, it is possible. > > > > > > > > > > Platform drivers can disable equalization phase 2 and 3, by > > > > setting dwc_pci_quirk flag DWC_EQUALIZATION_DISABLE. > > > > > > > > Signed-off-by: Anvesh Salveru > > > > Signed-off-by: Pankaj Dubey > > > > --- > > > > drivers/pci/controller/dwc/pcie-designware.c | 3 +++ > > > > drivers/pci/controller/dwc/pcie-designware.h | 2 ++ > > > > 2 files changed, 5 insertions(+) > > > > > > > > diff --git a/drivers/pci/controller/dwc/pcie-designware.c > > > > b/drivers/pci/controller/dwc/pcie-designware.c > > > > index bf82091..97a8268 100644 > > > > --- a/drivers/pci/controller/dwc/pcie-designware.c > > > > +++ b/drivers/pci/controller/dwc/pcie-designware.c > > > > @@ -472,5 +472,8 @@ void dw_pcie_setup(struct dw_pcie *pci) > > > > if (pci->dwc_pci_quirk & DWC_EQUALIZATION_DISABLE) > > > > val |= PORT_LOGIC_GEN3_EQ_DISABLE; > > > > > > > > + if (pci->dwc_pci_quirk & DWC_EQ_PHASE_2_3_DISABLE) > > > > + val |= PORT_LOGIC_GEN3_EQ_PHASE_2_3_DISABLE; > > > > + > > Also is it harmless to set both DWC_EQUALIZATION_DISABLE and > DWC_EQ_PHASE_2_3_DISABLE? (Which is permitted here). > Yes, it will be harmless. > Thanks, > > Andrew Murray > > > > > dw_pcie_writel_dbi(pci, PCIE_PORT_GEN3_RELATED, val); } > > > > diff --git a/drivers/pci/controller/dwc/pcie-designware.h > > > > b/drivers/pci/controller/dwc/pcie-designware.h > > > > index a1453c5..b541508 100644 > > > > --- a/drivers/pci/controller/dwc/pcie-designware.h > > > > +++ b/drivers/pci/controller/dwc/pcie-designware.h > > > > @@ -31,6 +31,7 @@ > > > > > > > > /* Parameters for PCIe Quirks */ > > > > #define DWC_EQUALIZATION_DISABLE 0x1 > > > > +#define DWC_EQ_PHASE_2_3_DISABLE 0x2 > > > > > > It only makes sense for either DWC_EQUALIZATION_DISABLE or > > > DWC_EQ_PHASE_2_3_DISABLE to be specified, though if dwc_pci_quirk > > > intends to hold other quirks should these be numbers and not bit fields? > > > > > Yes, you are right in a given platform it will be either > > DWC_EQUALIZATION_DISABLE or DWC_EQ_PHASE_2_3_DISABLE. > > > > Intention behind making it bit-field was to add other quirks in future. > > > > > Thanks, > > > > > > Andrew Murray > > > > > > > > > > > /* Synopsys-specific PCIe configuration registers */ > > > > #define PCIE_PORT_LINK_CONTROL 0x710 > > > > @@ -65,6 +66,7 @@ > > > > > > > > #define PCIE_PORT_GEN3_RELATED 0x890 > > > > #define PORT_LOGIC_GEN3_EQ_DISABLE BIT(16) > > > > +#define PORT_LOGIC_GEN3_EQ_PHASE_2_3_DISABLE BIT(9) > > > > > > > > #define PCIE_ATU_VIEWPORT 0x900 > > > > #define PCIE_ATU_REGION_INBOUND BIT(31) > > > > -- > > > > 2.7.4 > > > >