Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp706960ybd; Wed, 26 Jun 2019 04:49:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIU5SHHRmIbHo3HKs09tG/xGOpiy6OACGOutnKtPg4Y9J7Slt90o9afZh4YQ8ENc7kc0ep X-Received: by 2002:a17:902:b209:: with SMTP id t9mr5040145plr.254.1561549778103; Wed, 26 Jun 2019 04:49:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561549778; cv=none; d=google.com; s=arc-20160816; b=xSFpdaLjoJwsTlk1Kf6IQRv5L6tStsncJ0tS6edXHYo8nyFAJHmOjo6JGOFsxi0hB9 fhcWqrIJcrqKjMY8PN6qF9oCBBpMiJ5UyVBRpoGs9V4qGR8BkNsFk03Wo90dcdl8YwNy 4pb/0TgMEVejABR5huy+DG7YzWljgll/0pqJDnG9Kn1g6NTBLrG59lQPlEUMWqBN1Z5T GBTXzj/tSgIqNoWVAieo4FauXEM7cqQMFopCe6RnvgK9grPJ3pW7gziIKT+O9It+isGb CwGy50wdjhEvyxD87eDqvLsxbhlvB6DILpidIPTkjWhTMl1gO2up5TpPjIajIv/OXe+w VM0g== 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=pgK3SgQVpdbDe6JZRHFCRpqLm0GMVZk81EenhLszy1Q=; b=lAkwsZdGBIRHoQZcM7IIp+oElRBUD1iPEHPSv1pk2ZBragBW4QeUueDDYSnhUVjP4j pKGZ8qRwHd/dq3Kg/Q2P0aZWyDXuuggklUtxwZEkozKJ18RUB6q3FzBahabKBnA3hXQz f5pAM/XOLKo1UgjE31h9vZh7K7RgMW18O4cLrdJOEyTUojJiFOM5599D3WReCpJRPX4V 5JzWn9/Cdj4YencQ/nkr7gApZFo7BaVfPJ7oyZXTHkLTxF79QueJL+v9jWiP1nfanOhZ RGBgS9AVrwkzsXRrDc9vSvjHLMzM5YjVq6BVUao4hV0hdwIB7mgm2pfM2iOXtp/mfPMp BOiQ== 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 q31si1944550pjc.33.2019.06.26.04.49.19; Wed, 26 Jun 2019 04:49:38 -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 S1727239AbfFZLU5 (ORCPT + 99 others); Wed, 26 Jun 2019 07:20:57 -0400 Received: from inva020.nxp.com ([92.121.34.13]:42470 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727177AbfFZLU4 (ORCPT ); Wed, 26 Jun 2019 07:20:56 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id B0E411A09F0; Wed, 26 Jun 2019 13:20:53 +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 65E361A09DA; Wed, 26 Jun 2019 13:20:43 +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 D91FF402FB; Wed, 26 Jun 2019 19:20: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: [PATCHv2 2/2] PCI: layerscape: EP and RC drivers are compiled separately Date: Wed, 26 Jun 2019 19:11:39 +0800 Message-Id: <20190626111139.32878-2-xiaowei.bao@nxp.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20190626111139.32878-1-xiaowei.bao@nxp.com> References: <20190626111139.32878-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 --- v2: - No change. 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