From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752737AbdJaGZk (ORCPT ); Tue, 31 Oct 2017 02:25:40 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:44928 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750916AbdJaGZi (ORCPT ); Tue, 31 Oct 2017 02:25:38 -0400 Subject: Re: [PATCH v2 07/17] PCI: dwc: dra7xx: Refactor Kconfig and Makefile handling for host/ep mode To: Niklas Cassel , Bjorn Helgaas , Jingoo Han , Niklas Cassel , Arnd Bergmann , Peter Robinson , Jianguo Sun , Xiaowei Song , Tomasz Nowicki , Duc Dang References: <20171030124221.20690-1-niklas.cassel@axis.com> <20171030124221.20690-8-niklas.cassel@axis.com> CC: , From: Kishon Vijay Abraham I Message-ID: <5cbc1231-736b-c5bd-8d3e-af0cb8fc4f0f@ti.com> Date: Tue, 31 Oct 2017 11:53:46 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20171030124221.20690-8-niklas.cassel@axis.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 30 October 2017 06:12 PM, Niklas Cassel wrote: > The previous handling was a bit unorthodox and would have been a bit > bloated once more DWC based controllers added support for ep mode. > > Signed-off-by: Niklas Cassel Acked-by: Kishon Vijay Abraham I > --- > V2: > * New patch in this series. > > drivers/pci/dwc/Kconfig | 45 ++++++++++++++++++++++----------------------- > drivers/pci/dwc/Makefile | 4 +--- > 2 files changed, 23 insertions(+), 26 deletions(-) > > diff --git a/drivers/pci/dwc/Kconfig b/drivers/pci/dwc/Kconfig > index 113e09440f85..3954353e3e2e 100644 > --- a/drivers/pci/dwc/Kconfig > +++ b/drivers/pci/dwc/Kconfig > @@ -15,39 +15,38 @@ config PCIE_DW_EP > select PCIE_DW > > config PCI_DRA7XX > - bool "TI DRA7xx PCIe controller" > - depends on SOC_DRA7XX || COMPILE_TEST > - depends on (PCI && PCI_MSI_IRQ_DOMAIN) || PCI_ENDPOINT > - depends on OF && HAS_IOMEM && TI_PIPE3 > - help > - Enables support for the PCIe controller in the DRA7xx SoC. There > - are two instances of PCIe controller in DRA7xx. This controller can > - work either as EP or RC. In order to enable host-specific features > - PCI_DRA7XX_HOST must be selected and in order to enable device- > - specific features PCI_DRA7XX_EP must be selected. This uses > - the DesignWare core. > - > -if PCI_DRA7XX > + bool > > config PCI_DRA7XX_HOST > - bool "PCI DRA7xx Host Mode" > - depends on PCI > - depends on PCI_MSI_IRQ_DOMAIN > + bool "TI DRA7xx PCIe controller Host Mode" > + depends on SOC_DRA7XX || COMPILE_TEST > + depends on PCI && PCI_MSI_IRQ_DOMAIN > + depends on OF && HAS_IOMEM && TI_PIPE3 > select PCIE_DW_HOST > + select PCI_DRA7XX > default y > help > - Enables support for the PCIe controller in the DRA7xx SoC to work in > - host mode. > + Enables support for the PCIe controller in the DRA7xx SoC to work in > + host mode. There are two instances of PCIe controller in DRA7xx. > + This controller can work either as EP or RC. In order to enable > + host-specific features PCI_DRA7XX_HOST must be selected and in order > + to enable device-specific features PCI_DRA7XX_EP must be selected. > + This uses the DesignWare core. > > config PCI_DRA7XX_EP > - bool "PCI DRA7xx Endpoint Mode" > + bool "TI DRA7xx PCIe controller Endpoint Mode" > + depends on SOC_DRA7XX || COMPILE_TEST > depends on PCI_ENDPOINT > + depends on OF && HAS_IOMEM && TI_PIPE3 > select PCIE_DW_EP > + select PCI_DRA7XX > help > - Enables support for the PCIe controller in the DRA7xx SoC to work in > - endpoint mode. > - > -endif > + Enables support for the PCIe controller in the DRA7xx SoC to work in > + endpoint mode. There are two instances of PCIe controller in DRA7xx. > + This controller can work either as EP or RC. In order to enable > + host-specific features PCI_DRA7XX_HOST must be selected and in order > + to enable device-specific features PCI_DRA7XX_EP must be selected. > + This uses the DesignWare core. > > config PCIE_DW_PLAT > bool "Platform bus based DesignWare PCIe Controller" > diff --git a/drivers/pci/dwc/Makefile b/drivers/pci/dwc/Makefile > index 54f56f6e9236..260589bd4e1d 100644 > --- a/drivers/pci/dwc/Makefile > +++ b/drivers/pci/dwc/Makefile > @@ -2,9 +2,7 @@ obj-$(CONFIG_PCIE_DW) += pcie-designware.o > obj-$(CONFIG_PCIE_DW_HOST) += pcie-designware-host.o > obj-$(CONFIG_PCIE_DW_EP) += pcie-designware-ep.o > obj-$(CONFIG_PCIE_DW_PLAT) += pcie-designware-plat.o > -ifneq ($(filter y,$(CONFIG_PCI_DRA7XX_HOST) $(CONFIG_PCI_DRA7XX_EP)),) > - obj-$(CONFIG_PCI_DRA7XX) += pci-dra7xx.o > -endif > +obj-$(CONFIG_PCI_DRA7XX) += pci-dra7xx.o > obj-$(CONFIG_PCI_EXYNOS) += pci-exynos.o > obj-$(CONFIG_PCI_IMX6) += pci-imx6.o > obj-$(CONFIG_PCIE_SPEAR13XX) += pcie-spear13xx.o >