Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1550419ybc; Tue, 19 Nov 2019 23:47:58 -0800 (PST) X-Google-Smtp-Source: APXvYqwLHoAdLD/O9L9lBdzH/w+L+bkehWl/uSMHEWGyuoW8fvSDioNyG2Wn294AUfRduaLfYkMv X-Received: by 2002:a17:906:4dd5:: with SMTP id f21mr3372542ejw.203.1574236078100; Tue, 19 Nov 2019 23:47:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574236078; cv=none; d=google.com; s=arc-20160816; b=mg12RBWB2H5tJneorPB3zzU8GhKoBCG+ah/QN4RgeEYLFDlwKEkAT+m27Rn7TyHoeA rLIY9rdRtBF7rLtG5GB39sCbF57GLn7W0Qeru4Rk1WdruGNVLanyF8SiOYDfFtw2Dh8I 0ndU0mntJmf5b1acksz6DBsvRLvRJZsbbOV/BKyhJiSvFKvvtEEPbe6wFsWrZ9Hh5Tpp 4yY30Q/rxq+OH1PDIOQM2z8tzur9J3h/BMhwQ3oeW5qurNFII4YqTPdPp3t0FSIUptgK KpSXvOx7V73sZ+jvlWLNlxjopU51J3Erbr+x9VtNrr6JX9I+QTfddRx+ygQFCO1ri3Zd avlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=1LeuYGMaY9qydqrmzaAMKDeoWp58wYYv4iW+TBjsumc=; b=iUbA/TRULo35mOyyVVs7gf6G70NMJxYq9bwAFi+juQ1x3HJjVt+wdJaNmqjR+Nijxs s6hv1byPodye0xVojAAxe21JwkNGyHIWEuXQ26Mw/kE8Nbc1dz78geLJp9qWiHt4jfAf 5sKDbebNMFvkcJ8DF+HW6apXijj0AdVMbnxhLKDowsv6nqJ08/efmQnGWrqjnc83XD0e 2eSSHpSwogDKy4vlYYaqYM5ylLxyHwnVxORBsO2Egul2i3JQESuMkCzq1G+W+htKS69r 3LbEQmjiuHZXfnUvGRyhXxaeJbW3Mr0nyD4OhueWCaIymXIImbg3alttHwbBGZKEIz1c t/6g== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 63si17466791edl.131.2019.11.19.23.47.32; Tue, 19 Nov 2019 23:47:58 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727924AbfKTHnp (ORCPT + 99 others); Wed, 20 Nov 2019 02:43:45 -0500 Received: from mga04.intel.com ([192.55.52.120]:58426 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725268AbfKTHno (ORCPT ); Wed, 20 Nov 2019 02:43:44 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2019 23:43:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,221,1571727600"; d="scan'208";a="381275147" Received: from sgsxdev004.isng.intel.com (HELO localhost) ([10.226.88.13]) by orsmga005.jf.intel.com with ESMTP; 19 Nov 2019 23:43:40 -0800 From: Dilip Kota To: gustavo.pimentel@synopsys.com, lorenzo.pieralisi@arm.com, andrew.murray@arm.com, helgaas@kernel.org, jingoohan1@gmail.com, robh@kernel.org, martin.blumenstingl@googlemail.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, andriy.shevchenko@intel.com Cc: linux-kernel@vger.kernel.org, cheol.yong.kim@intel.com, chuanhua.lei@linux.intel.com, qi-ming.wu@intel.com, Dilip Kota Subject: [PATCH v8 3/3] PCI: artpec6: Configure FTS with dwc helper function Date: Wed, 20 Nov 2019 15:43:02 +0800 Message-Id: <49581e0bc143da17fd20074b1dec2126306f745f.1574158309.git.eswara.kota@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use DesignWare helper functions to configure Fast Training Sequence. Drop the respective code in the driver. Signed-off-by: Dilip Kota Reviewed-by: Andrew Murray --- Changes on v8: No change Changes on v7: No change Changes on v6: Typo fix:s/DesugnWare/DesignWare Update 'Utilize DesignWare' --> 'Use DesignWare' 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