Skip to contentSkip to conversation

chipidea: Allow user to select PCI/IMX options

PATCH New Jeff Mahoney 1 participant 1 message Aug 27, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 chipidea: Allow user to select PCI/IMX options

The chipidea driver currently has needless ifneq rules in the makefile for things that should be config options. This can be problematic, especially in the IMX case, since the OF_DEVICE dependency will be met on powerpc systems - which don't actually support the hardware via that method.

This patch adds _PCI and _IMX config options to allow the user to select whether to build the modules.

---
 drivers/usb/chipidea/Kconfig  |   11 +++++++++++
 drivers/usb/chipidea/Makefile |   11 ++---------
 2 files changed, 13 insertions(+), 9 deletions(-)
drivers/usb/chipidea/Kconfig +11 -0
@@ -31,4 +31,15 @@ config USB_CHIPIDEA_DEBUG
 	help
 	  Say Y here to enable debugging output of the ChipIdea driver.
 
+config USB_CHIPIDEA_PCI
+	bool "ChipIdea PCI support"
+	depends on PCI
+	help
+	  This option enables ChipIdea support on PCI.
+
+config USB_CHIPIDEA_IMX
+	bool "ChipIdea IMX support"
+	depends on OF_DEVICE
+	help
+	  This option enables ChipIdea support on IMX.
 endif
drivers/usb/chipidea/Makefile +2 -9
@@ -8,12 +8,5 @@ ci_hdrc-$(CONFIG_USB_CHIPIDEA_DEBUG)	+=
 # Glue/Bridge layers go here
 
 obj-$(CONFIG_USB_CHIPIDEA)	+= ci13xxx_msm.o
-
-# PCI doesn't provide stubs, need to check
-ifneq ($(CONFIG_PCI),)
-	obj-$(CONFIG_USB_CHIPIDEA)	+= ci13xxx_pci.o
-endif
-
-ifneq ($(CONFIG_OF_DEVICE),)
-	obj-$(CONFIG_USB_CHIPIDEA)	+= ci13xxx_imx.o
-endif
+obj-$(CONFIG_USB_CHIPIDEA_PCI)	+= ci13xxx_pci.o
+obj-$(CONFIG_USB_CHIPIDEA_IMX)	+= ci13xxx_imx.o
Signature · 2 lines
Jeff Mahoney
SUSE Labs