Message ID | 20180921102155.22839-5-kishon@ti.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp627847ljw; Fri, 21 Sep 2018 03:23:12 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbf/fiPr318cI89TZBQ6DQObq/bFZb6jTjTvoe0qoion4isQaczp48HO0jMmmk6Iw48ede0 X-Received: by 2002:a17:902:292b:: with SMTP id g40-v6mr43257651plb.223.1537525392543; Fri, 21 Sep 2018 03:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537525392; cv=none; d=google.com; s=arc-20160816; b=Nuq0r64UETtFSOesCDzhfQuOJpSNrn53+IdqaT1QDMZEIXq6fSpi3IQ0NUOd6PL+T0 C6rZalBwIsRISR1BQQRNq+S3N0Z3v8/+Kkv3JXttIpE+VH1X5eR6/Ps6K2EELF1Uo+Fz NsDcucuwlUkoeKA0zhTgUvLqqxqjRUkA5AGvi7tAwHBbG+9l2jl0/jY9EMY3rrh03laX 5t4NM7nKhhPzqW7rT2togFd+teLJ3ZB6J87pOnVx9ZGwfoUvNA3NUx1jq9iJeMzp5K/t tOAlDlH+GP4AMOQ2E4AauYgnEYc2vIz5XypBbGX9+l5O0wtWN3JwrOoxlMa7o9UyxiLB uiTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=AaI+OUZrQckJEDBIOcs2LNPZPM6sJdBLjz7B6GKG/q8=; b=nYbB9UGXFCLF7HJY9QOiUiuP/YXGzGFYI6wFQVk1/gbdVsg7WUIr9HQooA/H39ciEJ VDDx/sMjrkIp3PUDa0wUFVxAsGq8SHWFlbdhtONiSpTDDTsBHVHdo/Kk3ZKpX63n3M+e kpsYytPLIr6QbkFR/rhf6MFdq6OL4mvh7GI6BcjKcpsb/sctt826FLGGzl9UnKe7EwS9 J/JUFppqG4qNJPARKD5KYp9/GL2nv5fhB5v785KJNJRUpJmKzLMY3E2h6IcZfpshza43 kTtoerMK0IuvNlcMfH6h1Tn4lfdh2WMLGfg72EIBpdYfCpab6xOCFeKcZvCFy3PpEdlm 7mbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ykbg04nT; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7-v6si25437828pgq.637.2018.09.21.03.23.12; Fri, 21 Sep 2018 03:23:12 -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=@ti.com header.s=ti-com-17Q1 header.b=ykbg04nT; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389697AbeIUQLU (ORCPT <rfc822;igor.opaniuk@linaro.org> + 32 others); Fri, 21 Sep 2018 12:11:20 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:51242 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389621AbeIUQLU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 21 Sep 2018 12:11:20 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id w8LAMchP032991; Fri, 21 Sep 2018 05:22:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1537525358; bh=AaI+OUZrQckJEDBIOcs2LNPZPM6sJdBLjz7B6GKG/q8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ykbg04nTQdWsf7ECi1I5PUBmnnoYKpClPfZpS1pZ2BBiQBENQcBhF6zw9EkrZC1e4 cZCkoxIpGdcYyowfkRTf5HArwC2go4AZy84OgmWWJy4GKZJZ5qAsTUhVjKTpfK08wb UrVqAYBwWsaYxrpz7vMKj7OmYtp9GBdpkzgUo3ag= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w8LAMcGv028922; Fri, 21 Sep 2018 05:22:38 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 21 Sep 2018 05:22:38 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Fri, 21 Sep 2018 05:22:38 -0500 Received: from a0393678ub.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w8LAMEt8032280; Fri, 21 Sep 2018 05:22:34 -0500 From: Kishon Vijay Abraham I <kishon@ti.com> To: Jingoo Han <jingoohan1@gmail.com>, Joao Pinto <Joao.Pinto@synopsys.com>, Bjorn Helgaas <bhelgaas@google.com>, Rob Herring <robh+dt@kernel.org>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Murali Karicheri <m-karicheri2@ti.com>, Kishon Vijay Abraham I <kishon@ti.com>, <Gustavo.Pimentel@synopsys.com> CC: Mark Rutland <mark.rutland@arm.com>, Santosh Shilimkar <ssantosh@kernel.org>, Tero Kristo <t-kristo@ti.com>, Nishanth Menon <nm@ti.com>, <linux-pci@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org> Subject: [RFC PATCH 04/40] PCI: keystone: Do not initiate link training multiple times Date: Fri, 21 Sep 2018 15:51:19 +0530 Message-ID: <20180921102155.22839-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180921102155.22839-1-kishon@ti.com> References: <20180921102155.22839-1-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
Cleanup pci-keystone.c and Add AM654 PCIe Support
|
expand
|
diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index fec46cfccba5..aa7e706fc37d 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -86,21 +86,18 @@ DECLARE_PCI_FIXUP_ENABLE(PCI_ANY_ID, PCI_ANY_ID, quirk_limit_mrrs); static int ks_pcie_establish_link(struct keystone_pcie *ks_pcie) { struct dw_pcie *pci = ks_pcie->pci; - struct pcie_port *pp = &pci->pp; struct device *dev = pci->dev; - unsigned int retries; if (dw_pcie_link_up(pci)) { dev_info(dev, "Link already up\n"); return 0; } + ks_dw_pcie_initiate_link_train(ks_pcie); + /* check if the link is up or not */ - for (retries = 0; retries < 5; retries++) { - ks_dw_pcie_initiate_link_train(ks_pcie); - if (!dw_pcie_wait_for_link(pci)) - return 0; - } + if (!dw_pcie_wait_for_link(pci)) + return 0; dev_err(dev, "phy link never came up\n"); return -ETIMEDOUT;
commit 886bc5ceb5cc3ad4b219502d72 ("PCI: designware: Add generic dw_pcie_wait_for_link()") while adding a generic dw_pcie_wait_for_link() performed a special handling (initiate link training multiple times) for keystone which is not required. This also resulted in unncessarily waiting for more time to establish the link even when no PCI device is connected. Remove it and make it look similar to other dwc based PCIe drivers. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> --- drivers/pci/controller/dwc/pci-keystone.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) -- 2.17.1