Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2740940ybd; Thu, 27 Jun 2019 18:48:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWo3v1tZOs1QRoGxMh/4XEQeCFECcT+uZg/yIR+o9Y4EFaScjwqRrh8leOCRK5jBgCyDqS X-Received: by 2002:a63:f817:: with SMTP id n23mr6820524pgh.35.1561686492114; Thu, 27 Jun 2019 18:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561686492; cv=none; d=google.com; s=arc-20160816; b=yWArHhBqgMnmQVsJWJVo4gNPZi+qVWyRYz+fSCjMS8V1CGjRgbWxf4D2pHnJikQrXp BMpTyF4ZopgfCaZFIBBv9XpqBdaapRmryEJ/eHyvjNQJmIX6ILFA+teMsQ6yF8vvhQ6Q sO3OkwVknvHXkE509i7gziqZLuwbkDPM0OT5KbTWVwitiWoFG9glUsGw45vzaU4wQVKz cYVh/tlrgjofWtbY+dSDzISgxBrTxixqouFV1I2HsobJMvyV2dYHf1pQD96vI6faDPYf yT15PDexm0lxKOWOCMRC23geCmxFPFpD1l1LJuM/1qjQHLH/MarUf4WUD0Av9DjSU0vn 1I2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=vXQhJy7biJxiNfYgsBQdGApZ72BVSNPea47ijJf+8qA=; b=eQ+CMQSiY97K2z9q06aCxFi7imPVS5BiPwmG5LKLqJFGiUp31Lxkizep5f/L4yYutN FmCRktGMqnvdRoAb9109xu1tRN4saheccrwKE1YsRVQNBbwg3YhYg95is+jJpLLlvK51 y1xgcJJU4dddzOmgiiXgcrN2B7SOQANeKm777H9W2J7O+1Ck60csm1lu/uwB/pNF44ra BtjFqA5vDKX1xBA4+nLaZgTANAqf7k0WrnHhgvzhNmW7AN0KFcn5OYcJrKllUoFNL8+a RE5K0xY/S46yUT889FG3kIFE9EwLOB4T3Pi3CILe0byK5OvrnRlYi6ZnDFPsCEGLX7WO x42Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e8si666393plb.420.2019.06.27.18.47.55; Thu, 27 Jun 2019 18:48:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726508AbfF1Brv (ORCPT + 99 others); Thu, 27 Jun 2019 21:47:51 -0400 Received: from inva020.nxp.com ([92.121.34.13]:59812 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725770AbfF1Brt (ORCPT ); Thu, 27 Jun 2019 21:47:49 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 0074A1A1052; Fri, 28 Jun 2019 03:47:46 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 138801A104C; Fri, 28 Jun 2019 03:47:31 +0200 (CEST) Received: from titan.ap.freescale.net (TITAN.ap.freescale.net [10.192.208.233]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 8D10A4030E; Fri, 28 Jun 2019 09:47:18 +0800 (SGT) From: Xiaowei Bao To: bhelgaas@google.com, robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, leoyang.li@nxp.com, kishon@ti.com, lorenzo.pieralisi@arm.com, arnd@arndb.de, gregkh@linuxfoundation.org, minghuan.Lian@nxp.com, mingkai.hu@nxp.com, roy.zang@nxp.com, kstewart@linuxfoundation.org, pombredanne@nexb.com, shawn.lin@rock-chips.com, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org Cc: Xiaowei Bao Subject: [PATCHv3 2/2] PCI: layerscape: Add CONFIG_PCI_LAYERSCAPE_EP to build EP/RC separately Date: Fri, 28 Jun 2019 09:38:26 +0800 Message-Id: <20190628013826.4705-2-xiaowei.bao@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190628013826.4705-1-xiaowei.bao@nxp.com> References: <20190628013826.4705-1-xiaowei.bao@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add CONFIG_PCI_LAYERSCAPE_EP to build EP/RC separately. Signed-off-by: Xiaowei Bao --- v2: - No change. v3: - modify the commit message. drivers/pci/controller/dwc/Kconfig | 20 ++++++++++++++++++-- drivers/pci/controller/dwc/Makefile | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig index a6ce1ee..a41ccf5 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -131,13 +131,29 @@ config PCI_KEYSTONE_EP DesignWare core functions to implement the driver. config PCI_LAYERSCAPE - bool "Freescale Layerscape PCIe controller" + bool "Freescale Layerscape PCIe controller - Host mode" depends on OF && (ARM || ARCH_LAYERSCAPE || COMPILE_TEST) depends on PCI_MSI_IRQ_DOMAIN select MFD_SYSCON select PCIE_DW_HOST help - Say Y here if you want PCIe controller support on Layerscape SoCs. + Say Y here if you want to enable PCIe controller support on Layerscape + SoCs to work in Host mode. + This controller can work either as EP or RC. The RCW[HOST_AGT_PEX] + determines which PCIe controller works in EP mode and which PCIe + controller works in RC mode. + +config PCI_LAYERSCAPE_EP + bool "Freescale Layerscape PCIe controller - Endpoint mode" + depends on OF && (ARM || ARCH_LAYERSCAPE || COMPILE_TEST) + depends on PCI_ENDPOINT + select PCIE_DW_EP + help + Say Y here if you want to enable PCIe controller support on Layerscape + SoCs to work in Endpoint mode. + This controller can work either as EP or RC. The RCW[HOST_AGT_PEX] + determines which PCIe controller works in EP mode and which PCIe + controller works in RC mode. config PCI_HISI depends on OF && (ARM64 || COMPILE_TEST) diff --git a/drivers/pci/controller/dwc/Makefile b/drivers/pci/controller/dwc/Makefile index b085dfd..824fde7 100644 --- a/drivers/pci/controller/dwc/Makefile +++ b/drivers/pci/controller/dwc/Makefile @@ -8,7 +8,8 @@ obj-$(CONFIG_PCI_EXYNOS) += pci-exynos.o obj-$(CONFIG_PCI_IMX6) += pci-imx6.o obj-$(CONFIG_PCIE_SPEAR13XX) += pcie-spear13xx.o obj-$(CONFIG_PCI_KEYSTONE) += pci-keystone.o -obj-$(CONFIG_PCI_LAYERSCAPE) += pci-layerscape.o pci-layerscape-ep.o +obj-$(CONFIG_PCI_LAYERSCAPE) += pci-layerscape.o +obj-$(CONFIG_PCI_LAYERSCAPE_EP) += pci-layerscape-ep.o obj-$(CONFIG_PCIE_QCOM) += pcie-qcom.o obj-$(CONFIG_PCIE_ARMADA_8K) += pcie-armada8k.o obj-$(CONFIG_PCIE_ARTPEC6) += pcie-artpec6.o -- 1.7.1