[PATCH 03/28] 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  |   62 ++++++++++++++++++++++++++++++++-------------
 drivers/usb/musb/Makefile |   12 ++++----
 2 files changed, 50 insertions(+), 24 deletions(-)

diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index 2250b91..5e0a5e8 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -36,31 +36,57 @@ choice
 	prompt "Platform Glue Layer"
 	depends on USB_MUSB_HDRC
 
-config USB_MUSB_DAVINCI
-	bool "DaVinci"
-	depends on ARCH_DAVINCI_DMx
+config USB_MUSB_DAVINCI_GLUE
+	select USB_MUSB_DAVINCI
+	tristate "DaVinci"
+	depends on ARCH_DAVINCI_DMx && USB_MUSB_HDRC
+
+config USB_MUSB_DA8XX_GLUE
+	select USB_MUSB_DA8XX
+	tristate "DA8xx/OMAP-L1x"
+	depends on ARCH_DAVINCI_DA8XX && USB_MUSB_HDRC
+
+config USB_MUSB_TUSB6010_GLUE
+	select USB_MUSB_TUSB6010
+	tristate "TUSB6010"
+	depends on ARCH_OMAP && USB_MUSB_HDRC
+
+config USB_MUSB_OMAP2PLUS_GLUE
+	select USB_MUSB_OMAP2PLUS
+	tristate "OMAP2430 and onwards"
+	depends on ARCH_OMAP2PLUS && USB_MUSB_HDRC
+
+config USB_MUSB_AM35X_GLUE
+	select USB_MUSB_AM35X
+	tristate "AM35x"
+	depends on ARCH_OMAP && USB_MUSB_HDRC
+
+config USB_MUSB_BLACKFIN_GLUE
+	select USB_MUSB_BLACKFIN
+	tristate "Blackfin"
+	depends on (BF54x && !BF544) || (BF52x && ! BF522 && !BF523)
 
-config USB_MUSB_DA8XX
-	bool "DA8xx/OMAP-L1x"
-	depends on ARCH_DAVINCI_DA8XX
+endchoice
 
+config USB_MUSB_DAVINCI
+	bool
+	default n
+config USB_MUSB_DA8XX
+	bool
+	default n
 config USB_MUSB_TUSB6010
-	bool "TUSB6010"
-	depends on ARCH_OMAP
-
+	bool
+	default n
 config USB_MUSB_OMAP2PLUS
-	bool "OMAP2430 and onwards"
-	depends on ARCH_OMAP2PLUS
-
+	bool
+	default n
 config USB_MUSB_AM35X
-	bool "AM35x"
-	depends on ARCH_OMAP
-
+	bool
+	default n
 config USB_MUSB_BLACKFIN
-	bool "Blackfin"
-	depends on (BF54x && !BF544) || (BF52x && ! BF522 && !BF523)
+	bool
+	default n
 
-endchoice
 
 choice
 	prompt "Driver Mode"
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile
index 61f46af..1a8c663 100644
--- a/drivers/usb/musb/Makefile
+++ b/drivers/usb/musb/Makefile
@@ -13,12 +13,12 @@ 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_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
 
 # 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