All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH PATCH v2 0/2] Use CONFIG_USB_GADGET and CONFIG_SPL_USB_GADGET to select the USB gadget code
@ 2019-01-10 14:44 Jean-Jacques Hiblot
  2019-01-10 14:44 ` [U-Boot] [PATCH PATCH v2 1/2] Kconfig: rename CONFIG_SPL_USB_GADGET_SUPPORT as CONFIG_SPL_USB_GADGET Jean-Jacques Hiblot
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jean-Jacques Hiblot @ 2019-01-10 14:44 UTC (permalink / raw)
  To: u-boot


This series applies on top of u-boot-usb.

This series renames CONFIG_SPL_USB_GADGET_SUPPORT to CONFIG_SPL_USB_GADGET
for consistency.
It also uses CONFIG_USB_GADGET to compile-in the gadget code. This make
sure that the code is not included if it is not needed. Some defconfigs
had to be updated as they relied on the gadget code to be always compiled.


Changes in v2:
- rebased on top of latest u-boot-usb

Jean-Jacques Hiblot (2):
  Kconfig: rename CONFIG_SPL_USB_GADGET_SUPPORT as CONFIG_SPL_USB_GADGET
  usb: Make compiling gadget support optional

 Makefile                                 | 4 ++--
 arch/arm/mach-imx/mx6/Kconfig            | 2 +-
 arch/arm/mach-imx/spl.c                  | 2 +-
 common/spl/Kconfig                       | 4 ++--
 configs/am335x_boneblack_vboot_defconfig | 2 +-
 configs/am335x_evm_usbspl_defconfig      | 2 +-
 configs/am43xx_evm_defconfig             | 2 +-
 configs/am43xx_hs_evm_defconfig          | 2 +-
 configs/apalis_imx6_defconfig            | 2 +-
 configs/cm_t3517_defconfig               | 1 +
 configs/cm_t35_defconfig                 | 1 +
 configs/colibri_imx6_defconfig           | 2 +-
 configs/display5_factory_defconfig       | 2 +-
 configs/duovero_defconfig                | 1 +
 configs/igep0032_defconfig               | 1 +
 configs/igep00x0_defconfig               | 1 +
 configs/imx6q_logic_defconfig            | 2 +-
 configs/mx6memcal_defconfig              | 2 +-
 configs/mx6sabresd_defconfig             | 2 +-
 configs/omap3_zoom1_defconfig            | 1 +
 configs/omap4_panda_defconfig            | 1 +
 configs/omap4_sdp4430_defconfig          | 1 +
 configs/pico-hobbit-imx6ul_defconfig     | 2 +-
 configs/pico-hobbit-imx7d_defconfig      | 2 +-
 configs/pico-imx6ul_defconfig            | 2 +-
 configs/pico-imx7d_defconfig             | 2 +-
 configs/pico-pi-imx6ul_defconfig         | 2 +-
 configs/pico-pi-imx7d_defconfig          | 2 +-
 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 ++
 drivers/Makefile                         | 6 +++---
 drivers/usb/gadget/Makefile              | 2 +-
 scripts/Makefile.spl                     | 2 +-
 41 files changed, 55 insertions(+), 27 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH PATCH v2 1/2] Kconfig: rename CONFIG_SPL_USB_GADGET_SUPPORT as CONFIG_SPL_USB_GADGET
  2019-01-10 14:44 [U-Boot] [PATCH PATCH v2 0/2] Use CONFIG_USB_GADGET and CONFIG_SPL_USB_GADGET to select the USB gadget code Jean-Jacques Hiblot
@ 2019-01-10 14:44 ` Jean-Jacques Hiblot
  2019-01-10 14:44 ` [U-Boot] [PATCH PATCH v2 2/2] usb: Make compiling gadget support optional Jean-Jacques Hiblot
  2019-01-10 17:53 ` [U-Boot] [PATCH PATCH v2 0/2] Use CONFIG_USB_GADGET and CONFIG_SPL_USB_GADGET to select the USB gadget code Marek Vasut
  2 siblings, 0 replies; 5+ messages in thread
From: Jean-Jacques Hiblot @ 2019-01-10 14:44 UTC (permalink / raw)
  To: u-boot

The SPL option for USB gadget should be named after the option for u-boot
(CONFIG_USB_GADGET)

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

Changes in v2: None

 arch/arm/mach-imx/mx6/Kconfig            | 2 +-
 arch/arm/mach-imx/spl.c                  | 2 +-
 common/spl/Kconfig                       | 4 ++--
 configs/am335x_boneblack_vboot_defconfig | 2 +-
 configs/am335x_evm_usbspl_defconfig      | 2 +-
 configs/am43xx_evm_defconfig             | 2 +-
 configs/am43xx_hs_evm_defconfig          | 2 +-
 configs/apalis_imx6_defconfig            | 2 +-
 configs/colibri_imx6_defconfig           | 2 +-
 configs/display5_factory_defconfig       | 2 +-
 configs/imx6q_logic_defconfig            | 2 +-
 configs/mx6memcal_defconfig              | 2 +-
 configs/mx6sabresd_defconfig             | 2 +-
 configs/pico-hobbit-imx6ul_defconfig     | 2 +-
 configs/pico-hobbit-imx7d_defconfig      | 2 +-
 configs/pico-imx6ul_defconfig            | 2 +-
 configs/pico-imx7d_defconfig             | 2 +-
 configs/pico-pi-imx6ul_defconfig         | 2 +-
 configs/pico-pi-imx7d_defconfig          | 2 +-
 drivers/Makefile                         | 6 +++---
 drivers/usb/gadget/Makefile              | 2 +-
 scripts/Makefile.spl                     | 2 +-
 22 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index e7cce46e03..3d56346ccb 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -263,7 +263,7 @@ config TARGET_MX6DL_MAMOJ
 	select SPL_PINCTRL if SPL
 	select SPL_SEPARATE_BSS if SPL
 	select SPL_SERIAL_SUPPORT if SPL
-	select SPL_USB_GADGET_SUPPORT if SPL
+	select SPL_USB_GADGET if SPL
 	select SPL_USB_HOST_SUPPORT if SPL
 	select SPL_USB_SDP_SUPPORT if SPL
 	select SPL_WATCHDOG_SUPPORT if SPL
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index 58a92278df..397d6d4a91 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -154,7 +154,7 @@ u32 spl_boot_device(void)
 }
 #endif /* CONFIG_MX7 || CONFIG_IMX8M */
 
-#ifdef CONFIG_SPL_USB_GADGET_SUPPORT
+#ifdef CONFIG_SPL_USB_GADGET
 int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
 {
 	put_unaligned(CONFIG_USB_GADGET_PRODUCT_NUM + 0xfff, &dev->idProduct);
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 35472f4a92..37ecbc6b1c 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -776,13 +776,13 @@ config SPL_USB_SUPPORT
 	  config options. This enables loading from USB using a configured
 	  device.
 
-config SPL_USB_GADGET_SUPPORT
+config SPL_USB_GADGET
 	bool "Suppport USB Gadget drivers"
 	help
 	  Enable USB Gadget API which allows to enable USB device functions
 	  in SPL.
 
-if SPL_USB_GADGET_SUPPORT
+if SPL_USB_GADGET
 
 config SPL_USB_ETHER
 	bool "Support USB Ethernet drivers"
diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig
index c62e8322fb..f455b01e1e 100644
--- a/configs/am335x_boneblack_vboot_defconfig
+++ b/configs/am335x_boneblack_vboot_defconfig
@@ -16,7 +16,7 @@ CONFIG_SPL_MUSB_NEW_SUPPORT=y
 CONFIG_SPL_NET_SUPPORT=y
 CONFIG_SPL_NET_VCI_STRING="AM33xx U-Boot SPL"
 CONFIG_SPL_OS_BOOT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_ETHER=y
 CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
diff --git a/configs/am335x_evm_usbspl_defconfig b/configs/am335x_evm_usbspl_defconfig
index 1c315025d1..bda1785e7e 100644
--- a/configs/am335x_evm_usbspl_defconfig
+++ b/configs/am335x_evm_usbspl_defconfig
@@ -16,7 +16,7 @@ CONFIG_SPL_MUSB_NEW_SUPPORT=y
 CONFIG_SPL_NET_SUPPORT=y
 CONFIG_SPL_NET_VCI_STRING="AM335x U-Boot SPL"
 CONFIG_SPL_OS_BOOT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_ETHER=y
 # CONFIG_SPL_YMODEM_SUPPORT is not set
 CONFIG_CMD_SPL=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 481aa4fad9..e3464145eb 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -16,7 +16,7 @@ CONFIG_SPL_MTD_SUPPORT=y
 CONFIG_SPL_NET_SUPPORT=y
 CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL"
 CONFIG_SPL_OS_BOOT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_ETHER=y
 CONFIG_CMD_SPL=y
 CONFIG_CMD_SPL_NAND_OFS=0x00100000
diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig
index 5d98e0edee..99e4ccb592 100644
--- a/configs/am43xx_hs_evm_defconfig
+++ b/configs/am43xx_hs_evm_defconfig
@@ -25,7 +25,7 @@ CONFIG_SPL_NET_SUPPORT=y
 CONFIG_SPL_NET_VCI_STRING="AM43xx U-Boot SPL"
 CONFIG_SPL_USB_HOST_SUPPORT=y
 CONFIG_SPL_USB_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_ETHER=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_NAND=y
diff --git a/configs/apalis_imx6_defconfig b/configs/apalis_imx6_defconfig
index 133fc1a4db..e02d9bc7de 100644
--- a/configs/apalis_imx6_defconfig
+++ b/configs/apalis_imx6_defconfig
@@ -23,7 +23,7 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_DMA_SUPPORT=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Apalis iMX6 # "
diff --git a/configs/colibri_imx6_defconfig b/configs/colibri_imx6_defconfig
index d86c0872b4..68f0746657 100644
--- a/configs/colibri_imx6_defconfig
+++ b/configs/colibri_imx6_defconfig
@@ -23,7 +23,7 @@ CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_DMA_SUPPORT=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Colibri iMX6 # "
diff --git a/configs/display5_factory_defconfig b/configs/display5_factory_defconfig
index 6ef85e246c..4c73a3a246 100644
--- a/configs/display5_factory_defconfig
+++ b/configs/display5_factory_defconfig
@@ -25,7 +25,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
index 036069a437..46312a0ece 100644
--- a/configs/imx6q_logic_defconfig
+++ b/configs/imx6q_logic_defconfig
@@ -24,7 +24,7 @@ CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_SYS_PROMPT="i.MX6 Logic # "
diff --git a/configs/mx6memcal_defconfig b/configs/mx6memcal_defconfig
index 7356debc57..e9e1fc2635 100644
--- a/configs/mx6memcal_defconfig
+++ b/configs/mx6memcal_defconfig
@@ -11,7 +11,7 @@ CONFIG_NR_DRAM_BANKS=1
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg,SPL,MX6QDL"
 CONFIG_SUPPORT_RAW_INITRD=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_ETHER=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
index e0202ef57d..1857c189e3 100644
--- a/configs/mx6sabresd_defconfig
+++ b/configs/mx6sabresd_defconfig
@@ -19,7 +19,7 @@ CONFIG_SPL_EXT_SUPPORT=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/pico-hobbit-imx6ul_defconfig b/configs/pico-hobbit-imx6ul_defconfig
index e5713d7924..299eb37c12 100644
--- a/configs/pico-hobbit-imx6ul_defconfig
+++ b/configs/pico-hobbit-imx6ul_defconfig
@@ -18,7 +18,7 @@ CONFIG_DEFAULT_FDT_FILE="imx6ul-pico-hobbit.dtb"
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_CMD_BOOTMENU=y
 CONFIG_CMD_MEMTEST=y
diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig
index 0afc897ed9..4fe7beeaec 100644
--- a/configs/pico-hobbit-imx7d_defconfig
+++ b/configs/pico-hobbit-imx7d_defconfig
@@ -18,7 +18,7 @@ CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
 CONFIG_DEFAULT_FDT_FILE="imx7d-pico-hobbit.dtb"
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 # CONFIG_CMD_BOOTD is not set
 CONFIG_CMD_BOOTMENU=y
diff --git a/configs/pico-imx6ul_defconfig b/configs/pico-imx6ul_defconfig
index 907ccee77b..0f6cf9353a 100644
--- a/configs/pico-imx6ul_defconfig
+++ b/configs/pico-imx6ul_defconfig
@@ -18,7 +18,7 @@ CONFIG_DEFAULT_FDT_FILE="ask"
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_CMD_BOOTMENU=y
 CONFIG_CMD_SPL=y
diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig
index 19adeb35e1..542fcd4289 100644
--- a/configs/pico-imx7d_defconfig
+++ b/configs/pico-imx7d_defconfig
@@ -18,7 +18,7 @@ CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
 CONFIG_DEFAULT_FDT_FILE="ask"
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 # CONFIG_CMD_BOOTD is not set
 CONFIG_CMD_BOOTMENU=y
diff --git a/configs/pico-pi-imx6ul_defconfig b/configs/pico-pi-imx6ul_defconfig
index 3adccbb3ea..9049a49ee0 100644
--- a/configs/pico-pi-imx6ul_defconfig
+++ b/configs/pico-pi-imx6ul_defconfig
@@ -18,7 +18,7 @@ CONFIG_DEFAULT_FDT_FILE="imx6ul-pico-pi.dtb"
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_CMD_BOOTMENU=y
 CONFIG_CMD_MEMTEST=y
diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig
index 1558739e30..a2d857eeb8 100644
--- a/configs/pico-pi-imx7d_defconfig
+++ b/configs/pico-pi-imx7d_defconfig
@@ -18,7 +18,7 @@ CONFIG_BOOTCOMMAND="run findfdt; run finduuid; run distro_bootcmd"
 CONFIG_DEFAULT_FDT_FILE="imx7d-pico-pi.dtb"
 CONFIG_SPL_I2C_SUPPORT=y
 CONFIG_SPL_USB_HOST_SUPPORT=y
-CONFIG_SPL_USB_GADGET_SUPPORT=y
+CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 # CONFIG_CMD_BOOTD is not set
 CONFIG_CMD_BOOTMENU=y
diff --git a/drivers/Makefile b/drivers/Makefile
index 8c53e05d2f..4105864e2b 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -47,9 +47,9 @@ obj-$(CONFIG_SPL_ETH_SUPPORT) += net/
 obj-$(CONFIG_SPL_ETH_SUPPORT) += net/phy/
 obj-$(CONFIG_SPL_USB_ETHER) += net/phy/
 obj-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += usb/musb-new/
-obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += usb/gadget/
-obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += usb/common/
-obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += usb/gadget/udc/
+obj-$(CONFIG_SPL_USB_GADGET) += usb/gadget/
+obj-$(CONFIG_SPL_USB_GADGET) += usb/common/
+obj-$(CONFIG_SPL_USB_GADGET) += usb/gadget/udc/
 obj-$(CONFIG_SPL_DFU_SUPPORT) += dfu/
 obj-$(CONFIG_SPL_WATCHDOG_SUPPORT) += watchdog/
 obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += usb/host/
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index b74c1fdce9..01e2b3abf2 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -7,7 +7,7 @@ obj-$(CONFIG_USB_GADGET) += epautoconf.o config.o usbstring.o
 obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o
 
 ifdef CONFIG_SPL_BUILD
-obj-$(CONFIG_SPL_USB_GADGET_SUPPORT) += g_dnl.o
+obj-$(CONFIG_SPL_USB_GADGET) += g_dnl.o
 obj-$(CONFIG_SPL_DFU_SUPPORT) += f_dfu.o
 obj-$(CONFIG_SPL_USB_SDP_SUPPORT) += f_sdp.o
 endif
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 2ef19bf005..29626e0025 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -87,7 +87,7 @@ endif
 endif
 
 libs-y += drivers/
-libs-$(CONFIG_SPL_USB_GADGET_SUPPORT) += drivers/usb/dwc3/
+libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/dwc3/
 libs-y += dts/
 libs-y += fs/
 libs-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH PATCH v2 2/2] usb: Make compiling gadget support optional
  2019-01-10 14:44 [U-Boot] [PATCH PATCH v2 0/2] Use CONFIG_USB_GADGET and CONFIG_SPL_USB_GADGET to select the USB gadget code Jean-Jacques Hiblot
  2019-01-10 14:44 ` [U-Boot] [PATCH PATCH v2 1/2] Kconfig: rename CONFIG_SPL_USB_GADGET_SUPPORT as CONFIG_SPL_USB_GADGET Jean-Jacques Hiblot
@ 2019-01-10 14:44 ` Jean-Jacques Hiblot
  2019-01-10 17:53 ` [U-Boot] [PATCH PATCH v2 0/2] Use CONFIG_USB_GADGET and CONFIG_SPL_USB_GADGET to select the USB gadget code Marek Vasut
  2 siblings, 0 replies; 5+ messages in thread
From: Jean-Jacques Hiblot @ 2019-01-10 14:44 UTC (permalink / raw)
  To: u-boot

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@ti.com>

---

Changes in v2:
- rebased on top of latest u-boot-usb

 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 c4d0c3002e..ce2ca00730 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 0901fea638..c204a29081 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 f1fe2d058d..a27c502489 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 8ea626d013..782a9dc291 100644
--- a/configs/duovero_defconfig
+++ b/configs/duovero_defconfig
@@ -36,5 +36,6 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_MUSB_UDC=y
 CONFIG_USB_OMAP3=y
+CONFIG_USB_GADGET=y
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/igep0032_defconfig b/configs/igep0032_defconfig
index 383648789c..20d2cf5820 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 f2989e34e1..330350c32a 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 325c0020ca..489e6a8ee0 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 b66659f123..7ee9eea06a 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_HOST_ETHER=y
 CONFIG_USB_ETHER_SMSC95XX=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/omap4_sdp4430_defconfig b/configs/omap4_sdp4430_defconfig
index 6b2ea202e5..0e01c8edcb 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 bc0c3ec091..cb115fecb7 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 9b90cd8638..4064ba36e9 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 7786e66998..9373df83f7 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 1d41522b2a..a4f09a2735 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 b5214b5d82..8263454de6 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 3c10f3261e..80acff0cce 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 8fb84bcc60..00534b1c24 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 2cf39b450c..916321c60c 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 5c7b0a8ab4..d0bdc7587d 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 078e934bba..ccbfec9298 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.17.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH PATCH v2 0/2] Use CONFIG_USB_GADGET and CONFIG_SPL_USB_GADGET to select the USB gadget code
  2019-01-10 14:44 [U-Boot] [PATCH PATCH v2 0/2] Use CONFIG_USB_GADGET and CONFIG_SPL_USB_GADGET to select the USB gadget code Jean-Jacques Hiblot
  2019-01-10 14:44 ` [U-Boot] [PATCH PATCH v2 1/2] Kconfig: rename CONFIG_SPL_USB_GADGET_SUPPORT as CONFIG_SPL_USB_GADGET Jean-Jacques Hiblot
  2019-01-10 14:44 ` [U-Boot] [PATCH PATCH v2 2/2] usb: Make compiling gadget support optional Jean-Jacques Hiblot
@ 2019-01-10 17:53 ` Marek Vasut
  2019-01-10 20:31   ` Lukasz Majewski
  2 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2019-01-10 17:53 UTC (permalink / raw)
  To: u-boot

On 1/10/19 3:44 PM, Jean-Jacques Hiblot wrote:
> 
> This series applies on top of u-boot-usb.
> 
> This series renames CONFIG_SPL_USB_GADGET_SUPPORT to CONFIG_SPL_USB_GADGET
> for consistency.
> It also uses CONFIG_USB_GADGET to compile-in the gadget code. This make
> sure that the code is not included if it is not needed. Some defconfigs
> had to be updated as they relied on the gadget code to be always compiled.
> 
> 
> Changes in v2:
> - rebased on top of latest u-boot-usb
Thanks, I picked them into u-boot-usb/master instead of the ones in DFU PR.

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH PATCH v2 0/2] Use CONFIG_USB_GADGET and CONFIG_SPL_USB_GADGET to select the USB gadget code
  2019-01-10 17:53 ` [U-Boot] [PATCH PATCH v2 0/2] Use CONFIG_USB_GADGET and CONFIG_SPL_USB_GADGET to select the USB gadget code Marek Vasut
@ 2019-01-10 20:31   ` Lukasz Majewski
  0 siblings, 0 replies; 5+ messages in thread
From: Lukasz Majewski @ 2019-01-10 20:31 UTC (permalink / raw)
  To: u-boot

Hi Marek,

> On 1/10/19 3:44 PM, Jean-Jacques Hiblot wrote:
> > 
> > This series applies on top of u-boot-usb.
> > 
> > This series renames CONFIG_SPL_USB_GADGET_SUPPORT to
> > CONFIG_SPL_USB_GADGET for consistency.
> > It also uses CONFIG_USB_GADGET to compile-in the gadget code. This
> > make sure that the code is not included if it is not needed. Some
> > defconfigs had to be updated as they relied on the gadget code to
> > be always compiled.
> > 
> > 
> > Changes in v2:
> > - rebased on top of latest u-boot-usb  
> Thanks, I picked them into u-boot-usb/master instead of the ones in
> DFU PR.
> 

Great, thanks Marek.


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190110/1953cfb4/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-01-10 20:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-10 14:44 [U-Boot] [PATCH PATCH v2 0/2] Use CONFIG_USB_GADGET and CONFIG_SPL_USB_GADGET to select the USB gadget code Jean-Jacques Hiblot
2019-01-10 14:44 ` [U-Boot] [PATCH PATCH v2 1/2] Kconfig: rename CONFIG_SPL_USB_GADGET_SUPPORT as CONFIG_SPL_USB_GADGET Jean-Jacques Hiblot
2019-01-10 14:44 ` [U-Boot] [PATCH PATCH v2 2/2] usb: Make compiling gadget support optional Jean-Jacques Hiblot
2019-01-10 17:53 ` [U-Boot] [PATCH PATCH v2 0/2] Use CONFIG_USB_GADGET and CONFIG_SPL_USB_GADGET to select the USB gadget code Marek Vasut
2019-01-10 20:31   ` Lukasz Majewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.