From patchwork Fri Sep 21 10:21:18 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: 147190 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp627788ljw; Fri, 21 Sep 2018 03:23:08 -0700 (PDT) X-Google-Smtp-Source: ANB0VdattiRfsHmNooRU2GzMn2q35lxmg0dOvwaqqzbnWGYiaKNXfxqRjHizJg6I9Urykc4H5i4/ X-Received: by 2002:a62:398c:: with SMTP id u12-v6mr46394143pfj.9.1537525388846; Fri, 21 Sep 2018 03:23:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537525388; cv=none; d=google.com; s=arc-20160816; b=Uem2mKHX9YeBX9v4eaF/1EEbo2tKAM2LwDBn/nuUHvBAP22EyNZ4vrNqqcfJg4h8jX bNRVDNsPP2hGnN6b+YVptIPmQdlxIAYSmh+ocN8g5WlCxZ6DCwM1R86EWhoezjZ6VXSF uKRh2fsj4lDpJvOJkxBjNuMeXuAJAKd0W/mEZIka/0L1VhQgd8vdazXpovGq58xAO/cj 9QT2JJcv2YHGh0lRYWQ9OyrmzX7YlCSIWZpHj0pxXWCozkDTDe3AOc8OfHUgpzPaUKfh PNd+uoi6iAn6lbLluasWy6YWfScbLSwer51RadtiX4SZJ8kWlFt0KlGTBgZre/NWX0h0 wWxA== 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=m2I9GWG7+J9bU+KxLdAQ8BepACp+oq9aa3hH8US0JU1tMxj1wPwjIiBxHVhifnrO5b IZZmk13zEhN/ANVqXuoZ7Ch1ImoAZXCrhFD+PSwFbKKNOv2qMV6bpY9lI2Wthlg9HcOJ WRLWolTcAbQqvo3vBhSHsS4ACq4xIxuQz0AsiYsQgYo5nnQdv47R1+2Ur451+gfsUeom t5ue5zoPoQwCSw6UnLzxyEz6n99UDjF/QWqCIPWBcfcMP0NpwV0t3ohOedWRhyNjCqmp 6nGftt3Wo6WpK1ER5b/pukxFqcKYaul34tXUjrT64BcPSjXOB0T0g8cAXSUHVCsX9yLE sncA== 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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 x18-v6si26806725pll.88.2018.09.21.03.23.08; Fri, 21 Sep 2018 03:23:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 S2389626AbeIUQLT (ORCPT + 6 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 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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(-) -- 2.17.1 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);