[PATCH] PCI: keystone: Refactor Kconfig for RC/EP mode
From: Kishon Vijay Abraham I
Date: Mon Apr 22 2019 - 02:12:32 EST
Do not allow PCI_KEYSTONE to be visible to user and let user visible
CONFIG symbols PCI_KEYSTONE_HOST and PCI_KEYSTONE_EP select
PCI_KEYSTONE. This will let pci-keystone.c to be compiled only when
either PCI_KEYSTONE_HOST or PCI_KEYSTONE_EP is selected.
Signed-off-by: Kishon Vijay Abraham I <kishon@xxxxxx>
---
drivers/pci/controller/dwc/Kconfig | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/drivers/pci/controller/dwc/Kconfig
b/drivers/pci/controller/dwc/Kconfig
index b450ad2823a5..90618233d15b 100644
--- a/drivers/pci/controller/dwc/Kconfig
+++ b/drivers/pci/controller/dwc/Kconfig
@@ -103,34 +103,32 @@ config PCIE_SPEAR13XX
Say Y here if you want PCIe support on SPEAr13XX SoCs.
config PCI_KEYSTONE
- bool "TI Keystone PCIe controller"
- depends on ARCH_KEYSTONE || ARCH_K3 || ((ARM || ARM64) && COMPILE_TEST)
- help
- Say Y here if you want to enable PCI controller support on Keystone
- SoCs. The PCI controller on Keystone is based on DesignWare hardware
- and therefore the driver re-uses the DesignWare core functions to
- implement the driver.
-
-if PCI_KEYSTONE
+ bool
config PCI_KEYSTONE_HOST
bool "PCI Keystone Host Mode"
+ depends on ARCH_KEYSTONE || ARCH_K3 || ((ARM || ARM64) && COMPILE_TEST)
depends on PCI_MSI_IRQ_DOMAIN
select PCIE_DW_HOST
+ select PCI_KEYSTONE
default y
help
Enables support for the PCIe controller in the Keystone SoC to work in
- host mode.
+ host mode. The PCI controller on Keystone is based on DesignWare hardware
+ and therefore the driver re-uses the DesignWare core functions to
+ implement the driver.
config PCI_KEYSTONE_EP
bool "PCI Keystone Endpoint Mode"
+ depends on ARCH_KEYSTONE || ARCH_K3 || ((ARM || ARM64) && COMPILE_TEST)
depends on PCI_ENDPOINT
select PCIE_DW_EP
+ select PCI_KEYSTONE
help
Enables support for the PCIe controller in the Keystone SoC to work in
- endpoint mode.
-
-endif
+ endpoint mode. The PCI controller on Keystone is based on DesignWare hardware
+ and therefore the driver re-uses the DesignWare core functions to
+ implement the driver.
config PCI_LAYERSCAPE
bool "Freescale Layerscape PCIe controller"
--
2.17.1