From patchwork Wed Oct 17 07:40:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 149047 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp329164lji; Wed, 17 Oct 2018 00:44:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV63osKLKvp4VLiakhRrpPTuVbWqfs5EqGHMFVW63NH0YcRTY/ODA480myvv8kX0HSrIZ8MHi X-Received: by 2002:a63:2f42:: with SMTP id v63-v6mr9315184pgv.202.1539762262838; Wed, 17 Oct 2018 00:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539762262; cv=none; d=google.com; s=arc-20160816; b=nDGvb5ll+mx/l+yjihmDNRembogoUXYOtS9tB2cYmbPJ7lWVNJ8nmLRJse6YFUEVD9 2m5vMTwkpReB/u7po3vJy+dESsyTSqQv8TiD55Qsz3LXTwqC0F91sI3OA/WtPJTvrnoi 8zpPZQGleplbQiWDgTuE2GyPvKVGAENWxpsgLGNrHbJtpAh4xgEuy7VFJBAM2hEemeiS oNAOLJfiaHjMRt38uIvDWeistpGTUN3MUS5cmLbxpPoajK4CtEB0skmK+H7R4Yf9Qfj7 xELzcftM0NdZ/0hbNW9LSpEi8Olzot5ACH448YM8jicY4QiCmZAgeKsOVl81HuJDTIBP Lz1w== 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=gQ0+pQEKb3K+sriSc3X3V9ettXr93wDRpE/j2uyHhZs=; b=wPSsX4b/fdpht2lGm5LGMQ30BiUKpaxtArqHY376CSJc3FqvinYwCzJOGvtfsaqrQu LscOoC5+5w7S865JO+hC4ztTfzUjf0DeJKdNOTTrzFFat8M9r2Z2ho5tQksZ8LdYjNhR 7Ovdv6H1yPJ/2ZoACR/HQXXpQhmpZc8NVUG/hOGT4l/kWtPeHR6GfJUCBSRHAzDzaOv0 wo1RBhvCjNSUbt45e1HoqAxl/E2IMvx1dSEbERWZ+yxUBuaG5OsDNHuSHRkqYvC5bCcH KH5EY0u449ortoUQMQcSvigxfxrgJPiNQIIKsJ2LYu3NEwJD0T+sRdoFJZGF0y+ZFmG9 DhqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=W5l11px8; 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: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1-v6si11764809plt.48.2018.10.17.00.44.22; Wed, 17 Oct 2018 00:44:22 -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=W5l11px8; 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 S1727333AbeJQPgr (ORCPT + 32 others); Wed, 17 Oct 2018 11:36:47 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:52482 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726691AbeJQPgq (ORCPT ); Wed, 17 Oct 2018 11:36:46 -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 w9H7fuX6052240; Wed, 17 Oct 2018 02:41:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1539762116; bh=gQ0+pQEKb3K+sriSc3X3V9ettXr93wDRpE/j2uyHhZs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=W5l11px83QevDRGzJJ9cKAV8A5hphaVtfXnSqxhXSZgoPtVPpuYW8obDuN70tMiXT S411GXNU335RX1Bxot5NkNN9+NRmY4MNWKGe1VeOWvBsYgcEqz9RwmzRh4fUlXN66I /Zp16M7V4rfRj494m5DhmqJrxaKkCGja/2ymUg+Y= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9H7fupO023254; Wed, 17 Oct 2018 02:41:56 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Wed, 17 Oct 2018 02:41:56 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Wed, 17 Oct 2018 02:41:56 -0500 Received: from a0393678ub.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9H7fgSO009413; Wed, 17 Oct 2018 02:41:53 -0500 From: Kishon Vijay Abraham I To: Bjorn Helgaas , Lorenzo Pieralisi , Murali Karicheri , Jingoo Han , Gustavo Pimentel CC: Rob Herring , , , , , Kishon Vijay Abraham I Subject: [PATCH v2 03/21] PCI: keystone: Move dw_pcie_setup_rc out of ks_pcie_establish_link() Date: Wed, 17 Oct 2018 13:10:56 +0530 Message-ID: <20181017074114.28239-4-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181017074114.28239-1-kishon@ti.com> References: <20181017074114.28239-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No functional change. Move dw_pcie_setup_rc out of ks_pcie_establish_link() so that ks_pcie_establish_link can be used only to start the link. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/dwc/pci-keystone.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index 5d9c5d199ada..afb948372077 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -86,12 +86,9 @@ 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; - dw_pcie_setup_rc(pp); - if (dw_pcie_link_up(pci)) { dev_info(dev, "Link already up\n"); return 0; @@ -266,6 +263,8 @@ static int __init ks_pcie_host_init(struct pcie_port *pp) struct dw_pcie *pci = to_dw_pcie_from_pp(pp); struct keystone_pcie *ks_pcie = to_keystone_pcie(pci); + dw_pcie_setup_rc(pp); + ks_pcie_establish_link(ks_pcie); ks_dw_pcie_setup_rc_app_regs(ks_pcie); ks_pcie_setup_interrupts(ks_pcie);