Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp471636imm; Fri, 21 Sep 2018 03:24:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZNnV6BkYu2Wwl55WiWQnYIaTbIibvM6RF87BM/zNr4eviZRj5rdAGpHT87ZcZ47o2B6I8K X-Received: by 2002:a63:c245:: with SMTP id l5-v6mr40958953pgg.255.1537525442509; Fri, 21 Sep 2018 03:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537525442; cv=none; d=google.com; s=arc-20160816; b=Ylv57ay2nmKfgE2N7gHnZfRKzvXLdlgmfHcUGhHEU82np3/MklGDe9ViVoFgPgq/+E WitL6CyWCvt3vKFkw8A37BPZGeTfVKHgz0x6+paSNzHcUsunEyUUeTZWaa0af/yxjgpq UW4aHBitofEkunIRP/tJBsjPlruZbxAvxxV/D9m+wH8oyZmTQv7XM6HMTPYIBN8jhTv9 ArCMNcEXrDFA7DQ0RBF9158c1FBdYl80hZHawU8zTyAvSx8q+QccilFfxRlcQr1Uev+J uIQSW+W7+eFiMPmKmbCwuzi4hbCflCReFJhsxAO8nE3b0a2jSBfBJ2KocAkDvQKc9TF/ Z24w== 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=RX26ORmS1FgERqoIVtPaM64hJYygEP3WZMWAU+e+Q4M=; b=0zea6QEz9ZWywcTjfdi/mnfPymcgEW4HnlKxPGypvWzLO9D9lfDmEfxlAFrPg8Wor6 /LAZBIuU7FkTYPiQzmp1CMclNO9MppNNP5HwKk+Fq/qP3G84h9aaFfmW5RCCZLDIKUGm GIsG8B8K+XNBEgUe5o7GZvL6wEOPkmt3pp1w3+pG5HNiHrArzSrMFiBAV0C0D8v9ZCGd 2WzS4pSzwwD9huXS9iEDi3/mzHW7xtHHr8jfArDL79KSwYGaKsKxdlMtWaL/41p+oVIk Jrz4xegGf2cOnagexDx6O/m7KuJIFEpkSGgT6oXZQ8pxpAYgZmsEsoNwg4pR45vZ3KVE IYQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=t7VKd7l1; 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 91-v6si25755165ply.405.2018.09.21.03.23.47; Fri, 21 Sep 2018 03:24:02 -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=t7VKd7l1; 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 S2389647AbeIUQLT (ORCPT + 99 others); Fri, 21 Sep 2018 12:11:19 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:51240 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389547AbeIUQLT (ORCPT ); Fri, 21 Sep 2018 12:11:19 -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 w8LAMYjT032972; Fri, 21 Sep 2018 05:22:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1537525354; bh=RX26ORmS1FgERqoIVtPaM64hJYygEP3WZMWAU+e+Q4M=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=t7VKd7l1AKf2hsBrhgdLGMDZgeSYO8w490xa6AXszzTroZ9MtxVlTvMsAREIxea7W k4d43s32aafdnkMWRCBgsiDa8muQidL2TQFxV0bv0SjosVmcu6yGg1zORgWzzQynnI FvAB6kNNPCGYzRL5OMUJtCb5Zbi1R+P+MiYG3Dr0= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w8LAMXiP028864; Fri, 21 Sep 2018 05:22:33 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE104.ent.ti.com (10.64.6.25) 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:33 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE114.ent.ti.com (10.64.6.35) 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:34 -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 w8LAMEt7032280; Fri, 21 Sep 2018 05:22:29 -0500 From: Kishon Vijay Abraham I To: Jingoo Han , Joao Pinto , Bjorn Helgaas , Rob Herring , Lorenzo Pieralisi , Murali Karicheri , Kishon Vijay Abraham I , CC: Mark Rutland , Santosh Shilimkar , Tero Kristo , Nishanth Menon , , , , Subject: [RFC PATCH 03/40] PCI: keystone: Move dw_pcie_setup_rc out of ks_pcie_establish_link() Date: Fri, 21 Sep 2018 15:51:18 +0530 Message-ID: <20180921102155.22839-4-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: 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 only does what it is supposed to do. This will be required for adding EP support which will invoke ks_pcie_establish_link as part of start_link ops. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/dwc/pci-keystone.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index 5d9c5d199ada..fec46cfccba5 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -90,8 +90,6 @@ static int ks_pcie_establish_link(struct keystone_pcie *ks_pcie) 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 +264,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); -- 2.17.1