From patchwork Fri Aug 18 14:58:04 2017 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: 110412 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp939368obb; Fri, 18 Aug 2017 08:01:53 -0700 (PDT) X-Received: by 10.99.126.69 with SMTP id o5mr8958346pgn.2.1503068513829; Fri, 18 Aug 2017 08:01:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503068513; cv=none; d=google.com; s=arc-20160816; b=Yi1D1yh1yiwLEmZX3kjSShWVHvN6DZvbfRJyMonNJIdL9Xu2QcIotXBsCRJyQ/WKKA yn2hKhKkfdgDZXoHFNm9yft4uYQ6qjdf3MKbRnnn4ElNNgPMMIg8FdeBfE6H4XB0PbB9 ngLdCVbkbeMwqvOpLlgQiMvPHkjU5r423vDvS66MJmmtRT9tLbzSSGQ/J2RKhgOi/FCD irFPCwmbQ1zVBQZLz3ASsZsh8G7gO4xrAD7kcrKwIP52dj2Tc0kM9Jn0VgEt2tqh+A9u e8R5uqTCLVS87cftYBhWnJA0oJZ0IZMNHnJAofLF707/uA+sxFMO+VLtE6e6SsZtoTx1 O8HQ== 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 :arc-authentication-results; bh=9C/2I1ezyvepFU3mWiWfyAGeZoxBJaQsf6quWTIcJpM=; b=fF52juxqDz4wsPoWKcUPqoM4FhPoV35W0QdKAUQhiHrQBd61/WrpGo7NX3lmTL4PdN rr+ZxaQmJiOpcOLOr+EgFOL2jKcitfGvZmbgxn4sh1KLkrXabgl5e9j3IOmk6SE3QG6+ d4FXUNnXQtutrShyU1WJgiGV720MVT80BmmtUR8rn97TqDSo4eEDLA9O5k1B9KR4+tOG 3IXOJfhuQJcxJHR5B/Q0VJ+gDEY/zFPntL3xNU9Ey2n95FfjattIwME6ulOTDleY5zmi uff57micA1TqOhLtec/B3c2/xypCRtC8XOR8DZyLCKpc+vev042wNxklDHZIsOK4p2gq KDIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wWQNC1/6; 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 t11si3625368pgo.694.2017.08.18.08.01.53; Fri, 18 Aug 2017 08:01:53 -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=wWQNC1/6; 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 S1752636AbdHRPBv (ORCPT + 26 others); Fri, 18 Aug 2017 11:01:51 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:25728 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752407AbdHRO7C (ORCPT ); Fri, 18 Aug 2017 10:59:02 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v7IEwwjw013947; Fri, 18 Aug 2017 09:58:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1503068338; bh=9sGw+UyyJSby0H3tFB6DM9gaQQK3WCK4w8X8TDWskJU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wWQNC1/6/g0+3PNXQRs4D7TTQ7lBVGdNS+JuDa4Q1KSqNgHfVo4oyt6w7CRnrUpC3 PICYFD4KRSXcRXfGTrIfMaJ1nXtk6CLQoCEr0tR+egD4pFX7wMJJjcU2gRtI/D3MNN J5gjRTGQl4GeK6uBy+8wUAOlPW/xZaOASOYY1bmw= 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 v7IEwwoF012393; Fri, 18 Aug 2017 09:58:58 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Fri, 18 Aug 2017 09:58:58 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Fri, 18 Aug 2017 09:58:58 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Fri, 18 Aug 2017 09:58:58 -0500 Received: from a0393678ub.india.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 v7IEwKkA023721; Fri, 18 Aug 2017 09:58:55 -0500 From: Kishon Vijay Abraham I To: Bjorn Helgaas CC: Joao Pinto , Arnd Bergmann , , , , , , Subject: [PATCH 12/18] PCI: dwc: designware-ep: Do not disable BARs during initialization Date: Fri, 18 Aug 2017 20:28:04 +0530 Message-ID: <20170818145810.17649-13-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818145810.17649-1-kishon@ti.com> References: <20170818145810.17649-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 Some platforms like K2G has reserved use of BAR_0 which shouldn't be disabled by software. Avoid disabling all BARs during initialization. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/dwc/pcie-designware-ep.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.11.0 diff --git a/drivers/pci/dwc/pcie-designware-ep.c b/drivers/pci/dwc/pcie-designware-ep.c index e70ebe3b9b6f..b3205df38d52 100644 --- a/drivers/pci/dwc/pcie-designware-ep.c +++ b/drivers/pci/dwc/pcie-designware-ep.c @@ -283,7 +283,6 @@ int dw_pcie_ep_init(struct dw_pcie_ep *ep) { int ret; void *addr; - enum pci_barno bar; struct pci_epc *epc; struct dw_pcie *pci = to_dw_pcie_from_ep(ep); struct device *dev = pci->dev; @@ -312,9 +311,6 @@ int dw_pcie_ep_init(struct dw_pcie_ep *ep) return -ENOMEM; ep->outbound_addr = addr; - for (bar = BAR_0; bar <= BAR_5; bar++) - dw_pcie_ep_reset_bar(pci, bar); - if (ep->ops->ep_init) ep->ops->ep_init(ep);