Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2319957ybx; Fri, 8 Nov 2019 02:45:03 -0800 (PST) X-Google-Smtp-Source: APXvYqwrJGnNbZm6DoxLplsCAaCQUzAIBinokai65x2ItpkbY81IKF8Kyn2rdBC3TujkHHom4qi5 X-Received: by 2002:aa7:c4c8:: with SMTP id p8mr9332308edr.121.1573209903007; Fri, 08 Nov 2019 02:45:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573209902; cv=none; d=google.com; s=arc-20160816; b=gZHC1qjXI1LF4L9zO8HrZUzbZJDcK+PsQUwqt8fmmciC3HLJZvgZ7VqM6ioj8H91wt 4BL+mVBMCMIOt96825gBqNt4O0xDpwMW12dZmX1GatL5WYQcTXW8MbI+lsbHk77k1sQx 1pupZ5tvoM5/6b1tJrU9XuZo93SVW6KZNx17TD6WpsT/rwFIZvp1uQqR+S3vpjBc5JN+ gYrnTT4y4wPKbPMgr1+J1h6gSHGuecefvWaTM9AypaH5VrPGQnz1S7flqL1KODIDZtEE sGV9iQBzwgi1MbKMHVaaIcuPW1GKbdRPjz9LopcnGBIhkF86oiykNs0lxw2zhTqSHsOZ WB8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=UyKYYL7PIi/yIgj7yODGPnRwGz91Qeeda/qx/KVF0Vw=; b=ZTsSqfOMfjYBdSQhsbic0jYJMyIJSSMfJ4hg6tahrKVBScUXqJex50xeRwLp3MYqcu GUAVxaPpegZZIE0gnGvuJ/BIXTTqA+UHjaDCOiTiRA6VF9fzw4vmkoQ22ybpmODxiM5s sEdmkMn+MPBsEibq14PZ9hNxLMFkwFz2RJYH2KTCqx8EKo9LWEJhEtmgtPbsmgfvpmS+ mnAsBTYpShAwsZVXwTy5LxASMugeMlg5rxee1Lpo2hTFEEEd+GjsAKfZ4hDZ5yAkF1yo YkMK4Z3dYh6uTTRGHTB8gjWYwhRipLbf9YpUSk/jam8U8r/7dQ1cay+aADDev8ywC+8L wylw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b27si3941390ede.204.2019.11.08.02.44.39; Fri, 08 Nov 2019 02:45:02 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731945AbfKHKnn (ORCPT + 99 others); Fri, 8 Nov 2019 05:43:43 -0500 Received: from foss.arm.com ([217.140.110.172]:40264 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727016AbfKHKnm (ORCPT ); Fri, 8 Nov 2019 05:43:42 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D1FD431B; Fri, 8 Nov 2019 02:43:41 -0800 (PST) Received: from localhost (unknown [10.37.6.20]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 378B33F719; Fri, 8 Nov 2019 02:43:41 -0800 (PST) Date: Fri, 8 Nov 2019 10:43:39 +0000 From: Andrew Murray To: Jingoo Han Cc: Dilip Kota , "gustavo.pimentel@synopsys.com" , "lorenzo.pieralisi@arm.com" , "helgaas@kernel.org" , "robh@kernel.org" , "martin.blumenstingl@googlemail.com" , "linux-pci@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "andriy.shevchenko@intel.com" , "cheol.yong.kim@intel.com" , "chuanhua.lei@linux.intel.com" , "qi-ming.wu@intel.com" Subject: Re: [PATCH v5 3/3] PCI: artpec6: Configure FTS with dwc helper function Message-ID: <20191108104338.GG43905@e119886-lin.cambridge.arm.com> References: <90a64d72a32dbc75c03a58a1813f50e547170ff4.1572950559.git.eswara.kota@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1+81 (426a6c1) (2018-08-26) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 07, 2019 at 09:03:46PM +0000, Jingoo Han wrote: > On 11/5/19, 10:44 PM, Dilip Kota wrote: > > > > Utilize DesugnWare helper functions to configure Fast Training > > Nitpicking: Fix typo (DesugnWare --> DesignWare) > > If possible, how about the following? > Utilize DesignWare --> Use DesignWare > > Best regards, > Jingoo Han > > > Sequence. Drop the respective code in the driver. > > > > Signed-off-by: Dilip Kota With the changes suggested in this thread, you can add: Reviewed-by: Andrew Murray > > --- > > drivers/pci/controller/dwc/pcie-artpec6.c | 8 +------- > > 1 file changed, 1 insertion(+), 7 deletions(-) > > > > diff --git a/drivers/pci/controller/dwc/pcie-artpec6.c b/drivers/pci/controller/dwc/pcie-artpec6.c > > index d00252bd8fae..02d93b8c7942 100644 > > --- a/drivers/pci/controller/dwc/pcie-artpec6.c > > +++ b/drivers/pci/controller/dwc/pcie-artpec6.c > > @@ -51,9 +51,6 @@ static const struct of_device_id artpec6_pcie_of_match[]; > > #define ACK_N_FTS_MASK GENMASK(15, 8) > > #define ACK_N_FTS(x) (((x) << 8) & ACK_N_FTS_MASK) > > > > -#define FAST_TRAINING_SEQ_MASK GENMASK(7, 0) > > -#define FAST_TRAINING_SEQ(x) (((x) << 0) & FAST_TRAINING_SEQ_MASK) > > - > > /* ARTPEC-6 specific registers */ > > #define PCIECFG 0x18 > > #define PCIECFG_DBG_OEN BIT(24) > > @@ -313,10 +310,7 @@ static void artpec6_pcie_set_nfts(struct artpec6_pcie *artpec6_pcie) > > * Set the Number of Fast Training Sequences that the core > > * advertises as its N_FTS during Gen2 or Gen3 link training. > > */ > > - val = dw_pcie_readl_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL); > > - val &= ~FAST_TRAINING_SEQ_MASK; > > - val |= FAST_TRAINING_SEQ(180); > > - dw_pcie_writel_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL, val); > > + dw_pcie_link_set_n_fts(pci, 180); > > } > > > > static void artpec6_pcie_assert_core_reset(struct artpec6_pcie *artpec6_pcie) > > -- > > 2.11.0 >