[PATCH v1 03/27] usb: musb: support to compile hw glue layer driver as module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ming Lei <tom.leiming@xxxxxxxxx>

Obviously hw glue layer driver should be compiled as module,
which can help to build one single image to support multiple machines.

Signed-off-by: Ming Lei <tom.leiming@xxxxxxxxx>
---
 drivers/usb/musb/Kconfig  |   57 ++++++++++++++++++++++++++++++++++-----------
 drivers/usb/musb/Makefile |   14 +++++-----
 2 files changed, 50 insertions(+), 21 deletions(-)

diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 4cbb7e4..f7d6c61 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -37,36 +37,65 @@ choice
 	prompt "Platform Glue Layer"
 	depends on USB_MUSB_HDRC
 
-config USB_MUSB_DAVINCI
-	bool "DaVinci"
+config USB_MUSB_DAVINCI_GLUE
+	select USB_MUSB_DAVINCI
+	tristate "DaVinci"
 	depends on ARCH_DAVINCI_DMx
 
-config USB_MUSB_DA8XX
-	bool "DA8xx/OMAP-L1x"
+config USB_MUSB_DA8XX_GLUE
+	select USB_MUSB_DA8XX
+	tristate "DA8xx/OMAP-L1x"
 	depends on ARCH_DAVINCI_DA8XX
 
-config USB_MUSB_TUSB6010
-	bool "TUSB6010"
+config USB_MUSB_TUSB6010_GLUE
+	select USB_MUSB_TUSB6010
+	tristate "TUSB6010"
 	depends on ARCH_OMAP
 
-config USB_MUSB_OMAP2PLUS
-	bool "OMAP2430 and onwards"
+config USB_MUSB_OMAP2PLUS_GLUE
+	select USB_MUSB_OMAP2PLUS
+	tristate "OMAP2430 and onwards"
 	depends on ARCH_OMAP2PLUS
 
-config USB_MUSB_AM35X
-	bool "AM35x"
+config USB_MUSB_AM35X_GLUE
+	select USB_MUSB_AM35X
+	tristate "AM35x"
 	depends on ARCH_OMAP
 
-config USB_MUSB_BLACKFIN
-	bool "Blackfin"
+config USB_MUSB_BLACKFIN_GLUE
+	select USB_MUSB_BLACKFIN
+	tristate "Blackfin"
 	depends on (BF54x && !BF544) || (BF52x && ! BF522 && !BF523)
 
-config USB_MUSB_UX500
-	bool "U8500 and U5500"
+config USB_MUSB_UX500_GLUE
+	select USB_MUSB_UX500
+	tristate "U8500 and U5500"
 	depends on (ARCH_U8500 && AB8500_USB) || (ARCH_U5500)
 
 endchoice
 
+config USB_MUSB_DAVINCI
+	bool
+	default n
+config USB_MUSB_DA8XX
+	bool
+	default n
+config USB_MUSB_TUSB6010
+	bool
+	default n
+config USB_MUSB_OMAP2PLUS
+	bool
+	default n
+config USB_MUSB_AM35X
+	bool
+	default n
+config USB_MUSB_BLACKFIN
+	bool
+	default n
+config USB_MUSB_UX500
+	bool
+	default n
+
 choice
 	prompt "Driver Mode"
 	depends on USB_MUSB_HDRC
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile
index 74df528..11aa660 100644
--- a/drivers/usb/musb/Makefile
+++ b/drivers/usb/musb/Makefile
@@ -13,13 +13,13 @@ musb_hdrc-$(CONFIG_USB_MUSB_HDRC_HCD)		+= musb_virthub.o musb_host.o
 musb_hdrc-$(CONFIG_DEBUG_FS)			+= musb_debugfs.o
 
 # Hardware Glue Layer
-obj-$(CONFIG_USB_MUSB_OMAP2PLUS)		+= omap2430.o
-obj-$(CONFIG_USB_MUSB_AM35X)			+= am35x.o
-obj-$(CONFIG_USB_MUSB_TUSB6010)			+= tusb6010.o
-obj-$(CONFIG_USB_MUSB_DAVINCI)			+= davinci.o
-obj-$(CONFIG_USB_MUSB_DA8XX)			+= da8xx.o
-obj-$(CONFIG_USB_MUSB_BLACKFIN)			+= blackfin.o
-obj-$(CONFIG_USB_MUSB_UX500)			+= ux500.o
+obj-$(CONFIG_USB_MUSB_OMAP2PLUS_GLUE)		+= omap2430.o
+obj-$(CONFIG_USB_MUSB_AM35X_GLUE)			+= am35x.o
+obj-$(CONFIG_USB_MUSB_TUSB6010_GLUE)		+= tusb6010.o
+obj-$(CONFIG_USB_MUSB_DAVINCI_GLUE)			+= davinci.o
+obj-$(CONFIG_USB_MUSB_DA8XX_GLUE)			+= da8xx.o
+obj-$(CONFIG_USB_MUSB_BLACKFIN_GLUE)		+= blackfin.o
+obj-$(CONFIG_USB_MUSB_UX500_GLUE)			+= ux500.o
 
 # the kconfig must guarantee that only one of the
 # possible I/O schemes will be enabled at a time ...
-- 
1.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux