[U-Boot] [PATCH PATCH v1 2/2] usb: Make compiling gadget support optional

Jean-Jacques Hiblot jjhiblot at ti.com
Tue Jan 8 10:40:56 UTC 2019


There is no need to compile and include this code if it is not used.
CONFIG_USB_GADGET can be used for the purpose.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>

---

 Makefile                               | 4 ++--
 configs/cm_t3517_defconfig             | 1 +
 configs/cm_t35_defconfig               | 1 +
 configs/duovero_defconfig              | 1 +
 configs/igep0032_defconfig             | 1 +
 configs/igep00x0_defconfig             | 1 +
 configs/omap3_zoom1_defconfig          | 1 +
 configs/omap4_panda_defconfig          | 1 +
 configs/omap4_sdp4430_defconfig        | 1 +
 configs/spear300_usbtty_defconfig      | 2 ++
 configs/spear300_usbtty_nand_defconfig | 2 ++
 configs/spear310_usbtty_defconfig      | 2 ++
 configs/spear310_usbtty_nand_defconfig | 2 ++
 configs/spear310_usbtty_pnor_defconfig | 2 ++
 configs/spear320_usbtty_defconfig      | 2 ++
 configs/spear320_usbtty_nand_defconfig | 2 ++
 configs/spear320_usbtty_pnor_defconfig | 2 ++
 configs/spear600_usbtty_defconfig      | 2 ++
 configs/spear600_usbtty_nand_defconfig | 2 ++
 19 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 27c0919..08af796 100644
--- a/Makefile
+++ b/Makefile
@@ -712,8 +712,8 @@ libs-y += drivers/usb/dwc3/
 libs-y += drivers/usb/common/
 libs-y += drivers/usb/emul/
 libs-y += drivers/usb/eth/
-libs-y += drivers/usb/gadget/
-libs-y += drivers/usb/gadget/udc/
+libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/
+libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/udc/
 libs-y += drivers/usb/host/
 libs-y += drivers/usb/musb/
 libs-y += drivers/usb/musb-new/
diff --git a/configs/cm_t3517_defconfig b/configs/cm_t3517_defconfig
index 0901fea..c204a29 100644
--- a/configs/cm_t3517_defconfig
+++ b/configs/cm_t3517_defconfig
@@ -54,6 +54,7 @@ CONFIG_USB=y
 CONFIG_USB_MUSB_HOST=y
 CONFIG_USB_MUSB_AM35X=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
 CONFIG_VIDEO_OMAP3=y
 CONFIG_LCD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/cm_t35_defconfig b/configs/cm_t35_defconfig
index f1fe2d0..a27c502 100644
--- a/configs/cm_t35_defconfig
+++ b/configs/cm_t35_defconfig
@@ -56,6 +56,7 @@ CONFIG_USB_MUSB_UDC=y
 CONFIG_USB_OMAP3=y
 CONFIG_TWL4030_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
 CONFIG_VIDEO_OMAP3=y
 CONFIG_LCD=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/duovero_defconfig b/configs/duovero_defconfig
index 3c1fee4..e09a73d 100644
--- a/configs/duovero_defconfig
+++ b/configs/duovero_defconfig
@@ -36,6 +36,7 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_UDC=y
 CONFIG_USB_OMAP3=y
+CONFIG_USB_GADGET=y
 CONFIG_USB_STORAGE=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/igep0032_defconfig b/configs/igep0032_defconfig
index 3836487..20d2cf5 100644
--- a/configs/igep0032_defconfig
+++ b/configs/igep0032_defconfig
@@ -45,6 +45,7 @@ CONFIG_USB=y
 CONFIG_USB_MUSB_UDC=y
 CONFIG_USB_OMAP3=y
 CONFIG_TWL4030_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_FAT_WRITE=y
 CONFIG_UBIFS_SILENCE_MSG=y
 CONFIG_BCH=y
diff --git a/configs/igep00x0_defconfig b/configs/igep00x0_defconfig
index f2989e3..330350c 100644
--- a/configs/igep00x0_defconfig
+++ b/configs/igep00x0_defconfig
@@ -46,6 +46,7 @@ CONFIG_USB=y
 CONFIG_USB_MUSB_UDC=y
 CONFIG_USB_OMAP3=y
 CONFIG_TWL4030_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_FAT_WRITE=y
 CONFIG_UBIFS_SILENCE_MSG=y
 CONFIG_BCH=y
diff --git a/configs/omap3_zoom1_defconfig b/configs/omap3_zoom1_defconfig
index 325c002..489e6a8 100644
--- a/configs/omap3_zoom1_defconfig
+++ b/configs/omap3_zoom1_defconfig
@@ -35,5 +35,6 @@ CONFIG_USB=y
 CONFIG_USB_MUSB_UDC=y
 CONFIG_USB_OMAP3=y
 CONFIG_TWL4030_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/omap4_panda_defconfig b/configs/omap4_panda_defconfig
index 41df480..3852aed 100644
--- a/configs/omap4_panda_defconfig
+++ b/configs/omap4_panda_defconfig
@@ -36,6 +36,7 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_UDC=y
 CONFIG_USB_OMAP3=y
+CONFIG_USB_GADGET=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_SMSC95XX=y
diff --git a/configs/omap4_sdp4430_defconfig b/configs/omap4_sdp4430_defconfig
index 6b2ea20..0e01c8e 100644
--- a/configs/omap4_sdp4430_defconfig
+++ b/configs/omap4_sdp4430_defconfig
@@ -33,6 +33,7 @@ CONFIG_OMAP3_SPI=y
 CONFIG_USB=y
 CONFIG_USB_MUSB_UDC=y
 CONFIG_USB_OMAP3=y
+CONFIG_USB_GADGET=y
 CONFIG_FAT_WRITE=y
 # CONFIG_REGEX is not set
 CONFIG_OF_LIBFDT=y
diff --git a/configs/spear300_usbtty_defconfig b/configs/spear300_usbtty_defconfig
index bc0c3ec..cb115fe 100644
--- a/configs/spear300_usbtty_defconfig
+++ b/configs/spear300_usbtty_defconfig
@@ -27,3 +27,5 @@ CONFIG_PHY_GIGE=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_CONS_INDEX=0
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
diff --git a/configs/spear300_usbtty_nand_defconfig b/configs/spear300_usbtty_nand_defconfig
index 9b90cd8..4064ba3 100644
--- a/configs/spear300_usbtty_nand_defconfig
+++ b/configs/spear300_usbtty_nand_defconfig
@@ -28,3 +28,5 @@ CONFIG_PHY_GIGE=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_CONS_INDEX=0
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
diff --git a/configs/spear310_usbtty_defconfig b/configs/spear310_usbtty_defconfig
index 7786e66..9373df8 100644
--- a/configs/spear310_usbtty_defconfig
+++ b/configs/spear310_usbtty_defconfig
@@ -27,3 +27,5 @@ CONFIG_PHY_GIGE=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_CONS_INDEX=0
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
diff --git a/configs/spear310_usbtty_nand_defconfig b/configs/spear310_usbtty_nand_defconfig
index 1d41522..a4f09a2 100644
--- a/configs/spear310_usbtty_nand_defconfig
+++ b/configs/spear310_usbtty_nand_defconfig
@@ -28,3 +28,5 @@ CONFIG_PHY_GIGE=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_CONS_INDEX=0
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
diff --git a/configs/spear310_usbtty_pnor_defconfig b/configs/spear310_usbtty_pnor_defconfig
index b5214b5..8263454 100644
--- a/configs/spear310_usbtty_pnor_defconfig
+++ b/configs/spear310_usbtty_pnor_defconfig
@@ -30,3 +30,5 @@ CONFIG_PHY_GIGE=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_CONS_INDEX=0
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
diff --git a/configs/spear320_usbtty_defconfig b/configs/spear320_usbtty_defconfig
index 3c10f32..80acff0 100644
--- a/configs/spear320_usbtty_defconfig
+++ b/configs/spear320_usbtty_defconfig
@@ -27,3 +27,5 @@ CONFIG_PHY_GIGE=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_CONS_INDEX=0
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
diff --git a/configs/spear320_usbtty_nand_defconfig b/configs/spear320_usbtty_nand_defconfig
index 8fb84bc..00534b1 100644
--- a/configs/spear320_usbtty_nand_defconfig
+++ b/configs/spear320_usbtty_nand_defconfig
@@ -28,3 +28,5 @@ CONFIG_PHY_GIGE=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_CONS_INDEX=0
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
diff --git a/configs/spear320_usbtty_pnor_defconfig b/configs/spear320_usbtty_pnor_defconfig
index 2cf39b4..916321c 100644
--- a/configs/spear320_usbtty_pnor_defconfig
+++ b/configs/spear320_usbtty_pnor_defconfig
@@ -30,3 +30,5 @@ CONFIG_PHY_GIGE=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_CONS_INDEX=0
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
diff --git a/configs/spear600_usbtty_defconfig b/configs/spear600_usbtty_defconfig
index 5c7b0a8..d0bdc75 100644
--- a/configs/spear600_usbtty_defconfig
+++ b/configs/spear600_usbtty_defconfig
@@ -27,3 +27,5 @@ CONFIG_PHY_GIGE=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_CONS_INDEX=0
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
diff --git a/configs/spear600_usbtty_nand_defconfig b/configs/spear600_usbtty_nand_defconfig
index 078e934..ccbfec9 100644
--- a/configs/spear600_usbtty_nand_defconfig
+++ b/configs/spear600_usbtty_nand_defconfig
@@ -28,3 +28,5 @@ CONFIG_PHY_GIGE=y
 CONFIG_ETH_DESIGNWARE=y
 CONFIG_MII=y
 CONFIG_CONS_INDEX=0
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
-- 
2.7.4



More information about the U-Boot mailing list