From patchwork Mon Oct 15 13:07:05 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: 148833 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp3776544lji; Mon, 15 Oct 2018 06:09:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV61KoEcQuMXccjfE4gnTyYzO4ILXtfAzjvZTliNVvBPBBb7oegmdsIIVjsQuWxwl7C57w8b1 X-Received: by 2002:a17:902:9895:: with SMTP id s21-v6mr5073161plp.102.1539608953207; Mon, 15 Oct 2018 06:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539608953; cv=none; d=google.com; s=arc-20160816; b=xq78f6wYoaJbVMj7NQvsUPFpVegTYmdJh4IIW+R2ZGcVq7IRKzNRCt7aTukQToBlbI FYmBUxsLTmu1w7u7nZcuE6iXtcumAu/xhT98z1PKZ2X0bJ3nMkYWE5nTAnMuPhKUql1S MNUuEM4DVps90ujRTT6PpR3E9uJQo84NbAsmp2Mq+L9feLckH8cOao+YvTVvGMKIk3LD hvm703rF/VpWfvqXn35vTyImVehHG1VJC1AFqHo0MIbFgikRIatvw1nDeNC6TlJkLwc9 YGxmDU9D/Tye4n9VWeSntZVQ827MvF9StoSPelw++bqtdkpPqKT5RyzQHdr+wjOL3t/t rGVA== 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=U7XEqEcS+pj+I1udAmUaD2vRuUFdnEJHniqEoHhUP67BNsRVZ9Fq21WfdspaTIiYDV 3G+CMxRl/QQKOXXFSw/y8WBtAZSrUqCuuOfFogmTbBSXA0eUqDkrl+ZMoYyCz7TgxZVJ zNJ0L1XDJZ64Oub1nri6nC9s4rVLeAHDdaqJ6xW9fsm67Pryrd51EqjHc6XmbZGzCPSl n8BhtQKxFzhyT179JNIQgRHHwi7nSmaUElGr06JAml7PjpuLMmQsVPZNuCCJiMGcVEvP dQYdGeWlfd+dWXZLMT7EdlfyuDIMifjCbnR0fSe15dTW4YcMrbfg/CiJHYKRmbWyy0uq Cf4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FEPjW3Ua; 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 r3-v6si8169164plb.197.2018.10.15.06.09.07; Mon, 15 Oct 2018 06:09:13 -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=FEPjW3Ua; 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 S1726719AbeJOUxt (ORCPT + 32 others); Mon, 15 Oct 2018 16:53:49 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:38760 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726524AbeJOUxs (ORCPT ); Mon, 15 Oct 2018 16:53:48 -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 w9FD89L6119664; Mon, 15 Oct 2018 08:08:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1539608889; bh=gQ0+pQEKb3K+sriSc3X3V9ettXr93wDRpE/j2uyHhZs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=FEPjW3UaTJnbAFq4v0kErrUsBLCfKdxNXgEUEYgkbUigy9mRJ4l3uNIlbE8O6d6r5 nPSugZ83x+IwmAwxtNaJm+mlqjJH62CCvpSGjDqN8R7eP84tO9R/AbBuUQpF6p60Xk ZGSeEYSHiPakoSJ2o3HCb/KLGGRt6PMUKybdCInw= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9FD89OW032597; Mon, 15 Oct 2018 08:08:09 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Mon, 15 Oct 2018 08:08:09 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Mon, 15 Oct 2018 08:08:09 -0500 Received: from a0393678ub.dal.design.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w9FD7tL6009433; Mon, 15 Oct 2018 08:08:06 -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 03/19] PCI: keystone: Move dw_pcie_setup_rc out of ks_pcie_establish_link() Date: Mon, 15 Oct 2018 18:37:05 +0530 Message-ID: <20181015130721.5535-4-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181015130721.5535-1-kishon@ti.com> References: <20181015130721.5535-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);