Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3403089yba; Mon, 29 Apr 2019 01:29:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+A2so4ZfEx/+7VJvc30Bz4XGISxgqtPq8Jb4uvJDQ3UWHTMSISfgRgaUAwUdoBp3g50rY X-Received: by 2002:a63:6e01:: with SMTP id j1mr57994686pgc.442.1556526560427; Mon, 29 Apr 2019 01:29:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556526560; cv=none; d=google.com; s=arc-20160816; b=OB9ntsc5ab3AhTqlVBlC5sb0RdX+kLnikYl1HMFfmXHQylMpHoNef2RyLmms70UBlM KxQlKyAEc3uw0WYAljHHyd5vP89oONCgAvd8LTzFg1AwKkqpJOiIvTf4367yLvLNqFHm a082adoQysDLbBBQdHe4bxnDZ8X5ksQv7Z7CVBhKvp5FxHS0f2JUkkhYd4P9sPtgD9ji 0MIDuoMr0SAnEP6QCHuSB/fded3sNHPjkl23T/8AglvhHGryRP3Q0z8BUcnmwQm29Ge4 fgVVEZN0qJrXjrXrtAhlBqrNIN9wepSoFzLlQ9ZpGDEpagUpjILmIuHOuFafZdUhSKjI 3APQ== 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=qZCle4Lkli0Y3kzW11q08J87BEO8Sx8zyHtjAjcRWL8=; b=nY6SWLox2lXvUl3NPnA8ge/TUFhcL3NtFczLbrnOH+Hsz6gKDzGrBpzcr4z2fsdOQW J3mkv8TCksBguzBK78UnOhjFYUhulJrHNHyzj9kdeoTaJt0MNF2sqCg9c2IcR0d3E95C HJ1l8giw6VNUznqs3BvHWb9kw83FMx7gUK3Q6XUN+Jwk0uQjVwFXhDQihIx48GWjlz29 ZOe+wKuFHJMcTzOMtPpofhbt5d5qYQ2x5DBVX15paZVwsFaDBmVVBHfo+YjZHiGjnYFP gynoKIRHF87wn/FBYYBU7iD1aUVBrW2hgxwGVIKVjbl885C8FF5/g+DYNxDUxIYdML9j /kug== 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 j187si33778748pfc.181.2019.04.29.01.29.05; Mon, 29 Apr 2019 01:29:20 -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 S1727682AbfD2I1y (ORCPT + 99 others); Mon, 29 Apr 2019 04:27:54 -0400 Received: from inva021.nxp.com ([92.121.34.21]:45690 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727444AbfD2I1w (ORCPT ); Mon, 29 Apr 2019 04:27:52 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 745D62001A3; Mon, 29 Apr 2019 10:27:50 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 73F2920024C; Mon, 29 Apr 2019 10:27:41 +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 833DE4030F; Mon, 29 Apr 2019 16:27:30 +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: [PATCH 2/2] PCI: layerscape: EP and RC drivers are compiled separately Date: Mon, 29 Apr 2019 16:19:57 +0800 Message-Id: <20190429081957.47945-2-xiaowei.bao@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190429081957.47945-1-xiaowei.bao@nxp.com> References: <20190429081957.47945-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 Compile the EP and RC drivers separately with different configuration options, this looks clearer. Signed-off-by: Xiaowei Bao --- 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 9061823..84f8906 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -131,13 +131,29 @@ config PCI_KEYSTONE_EP 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