Skip to contentSkip to conversation

usb: gadget: Move CONFIG_USB_GADGET to Kconfig

PATCH New Semen Protsenko 2 participants 4 messages Mar 22, 2016 – Apr 3, 2016

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

PATCH 1/1 usb: gadget: Move CONFIG_USB_GADGET to Kconfig

From: Sam Protsenko <[email protected]>

The description was borrowed from kernel. "tristate" type was changed to "bool" (I believe we don't support modules for u-boot yet, right?). CONFIG_USB_GADGET requires CONFIG_USB to be defined too, so add it along as well.

Some platforms weren't ported though:

    include/configs/e2220-1170.h
    include/configs/sunxi-common.h
    include/configs/xilinx_zynqmp.h

CONFIG_USB_GADGET remains in those files as there is no corresponding defconfig files for those and I don't want to break anything.

---
 configs/am335x_baltos_defconfig              |  2 ++
 configs/am335x_boneblack_defconfig           |  2 ++
 configs/am335x_boneblack_vboot_defconfig     |  2 ++
 configs/am335x_evm_defconfig                 |  2 ++
 configs/am335x_evm_nor_defconfig             |  2 ++
 configs/am335x_evm_norboot_defconfig         |  2 ++
 configs/am335x_evm_spiboot_defconfig         |  2 ++
 configs/am335x_evm_usbspl_defconfig          |  2 ++
 configs/am335x_gp_evm_defconfig              |  2 ++
 configs/am437x_gp_evm_defconfig              |  2 ++
 configs/am437x_sk_evm_defconfig              |  2 ++
 configs/am43xx_evm_defconfig                 |  2 ++
 configs/am43xx_evm_ethboot_defconfig         |  2 ++
 configs/am43xx_evm_qspiboot_defconfig        |  2 ++
 configs/am43xx_evm_usbhost_boot_defconfig    |  2 ++
 configs/apalis_t30_defconfig                 |  1 +
 configs/bcm11130_defconfig                   |  2 ++
 configs/bcm11130_nand_defconfig              |  2 ++
 configs/bcm28155_ap_defconfig                |  2 ++
 configs/bcm28155_w1d_defconfig               |  2 ++
 configs/beaver_defconfig                     |  1 +
 configs/birdland_bav335a_defconfig           |  2 ++
 configs/birdland_bav335b_defconfig           |  2 ++
 configs/cgtqmx6eval_defconfig                |  2 ++
 configs/colibri_t20_defconfig                |  1 +
 configs/colibri_t30_defconfig                |  1 +
 configs/colibri_vf_defconfig                 |  2 ++
 configs/corvus_defconfig                     |  2 ++
 configs/dalmore_defconfig                    |  1 +
 configs/dra72_evm_defconfig                  |  2 ++
 configs/dra74_evm_defconfig                  |  2 ++
 configs/dra7xx_evm_defconfig                 |  2 ++
 configs/dra7xx_evm_qspiboot_defconfig        |  2 ++
 configs/dra7xx_evm_uart3_defconfig           |  2 ++
 configs/draco_defconfig                      |  2 ++
 configs/gwventana_defconfig                  |  2 ++
 configs/jetson-tk1_defconfig                 |  1 +
 configs/kc1_defconfig                        |  1 +
 configs/ma5d4evk_defconfig                   |  2 ++
 configs/mx6dlsabreauto_defconfig             |  2 ++
 configs/mx6dlsabresd_defconfig               |  2 ++
 configs/mx6qpsabreauto_defconfig             |  2 ++
 configs/mx6qsabreauto_defconfig              |  2 ++
 configs/mx6qsabrelite_defconfig              |  2 ++
 configs/mx6qsabresd_defconfig                |  2 ++
 configs/mx6sabresd_spl_defconfig             |  2 ++
 configs/mx7dsabresd_defconfig                |  2 ++
 configs/nitrogen6dl2g_defconfig              |  2 ++
 configs/nitrogen6dl_defconfig                |  2 ++
 configs/nitrogen6q2g_defconfig               |  2 ++
 configs/nitrogen6q_defconfig                 |  2 ++
 configs/nitrogen6s1g_defconfig               |  2 ++
 configs/nitrogen6s_defconfig                 |  2 ++
 configs/nyan-big_defconfig                   |  1 +
 configs/odroid-xu3_defconfig                 |  1 +
 configs/odroid_defconfig                     |  1 +
 configs/omap3_beagle_defconfig               |  2 ++
 configs/omap3_logic_defconfig                |  2 ++
 configs/omap5_uevm_defconfig                 |  2 ++
 configs/origen_defconfig                     |  1 +
 configs/p2371-0000_defconfig                 |  1 +
 configs/p2371-2180_defconfig                 |  1 +
 configs/p2571_defconfig                      |  1 +
 configs/pengwyn_defconfig                    |  2 ++
 configs/pxm2_defconfig                       |  2 ++
 configs/rastaban_defconfig                   |  2 ++
 configs/rut_defconfig                        |  2 ++
 configs/s5p_goni_defconfig                   |  2 ++
 configs/s5pc210_universal_defconfig          |  1 +
 configs/sama5d2_xplained_mmc_defconfig       |  2 ++
 configs/sama5d2_xplained_spiflash_defconfig  |  2 ++
 configs/sama5d3xek_mmc_defconfig             |  2 ++
 configs/sama5d3xek_nandflash_defconfig       |  2 ++
 configs/sama5d3xek_spiflash_defconfig        |  2 ++
 configs/sama5d4_xplained_mmc_defconfig       |  2 ++
 configs/sama5d4_xplained_nandflash_defconfig |  2 ++
 configs/sama5d4_xplained_spiflash_defconfig  |  2 ++
 configs/sama5d4ek_mmc_defconfig              |  2 ++
 configs/sama5d4ek_nandflash_defconfig        |  2 ++
 configs/sama5d4ek_spiflash_defconfig         |  2 ++
 configs/smartweb_defconfig                   |  2 ++
 configs/sniper_defconfig                     |  1 +
 configs/socfpga_arria5_defconfig             |  1 +
 configs/socfpga_cyclone5_defconfig           |  1 +
 configs/socfpga_de0_nano_soc_defconfig       |  1 +
 configs/socfpga_mcvevk_defconfig             |  1 +
 configs/socfpga_sockit_defconfig             |  1 +
 configs/socfpga_socrates_defconfig           |  1 +
 configs/taurus_defconfig                     |  2 ++
 configs/tbs2910_defconfig                    |  2 ++
 configs/thuban_defconfig                     |  2 ++
 configs/trats2_defconfig                     |  1 +
 configs/trats_defconfig                      |  1 +
 configs/venice2_defconfig                    |  1 +
 configs/vinco_defconfig                      |  2 ++
 configs/warp_defconfig                       |  2 ++
 configs/zynq_picozed_defconfig               |  2 ++
 configs/zynq_zc706_defconfig                 |  2 ++
 configs/zynq_zed_defconfig                   |  2 ++
 configs/zynq_zybo_defconfig                  |  2 ++
 drivers/usb/Kconfig                          |  2 ++
 drivers/usb/gadget/Kconfig                   | 35 ++++++++++++++++++++++++++++
 include/configs/am335x_evm.h                 |  1 -
 include/configs/am43xx_evm.h                 |  1 -
 include/configs/baltos.h                     |  1 -
 include/configs/bav335x.h                    |  1 -
 include/configs/bcm28155_ap.h                |  1 -
 include/configs/cgtqmx6eval.h                |  1 -
 include/configs/colibri_vf.h                 |  1 -
 include/configs/corvus.h                     |  1 -
 include/configs/dra7xx_evm.h                 |  1 -
 include/configs/e2220-1170.h                 |  6 +++++
 include/configs/exynos4-common.h             |  1 -
 include/configs/gw_ventana.h                 |  1 -
 include/configs/kc1.h                        |  1 -
 include/configs/ma5d4evk.h                   |  1 -
 include/configs/mx6sabre_common.h            |  1 -
 include/configs/mx7dsabresd.h                |  1 -
 include/configs/nitrogen6x.h                 |  1 -
 include/configs/odroid_xu3.h                 |  1 -
 include/configs/omap3_beagle.h               |  1 -
 include/configs/omap3_logic.h                |  1 -
 include/configs/omap5_uevm.h                 |  1 -
 include/configs/pengwyn.h                    |  1 -
 include/configs/s5p_goni.h                   |  1 -
 include/configs/s5pc210_universal.h          |  1 -
 include/configs/sama5d2_xplained.h           |  1 -
 include/configs/sama5d3xek.h                 |  1 -
 include/configs/sama5d4_xplained.h           |  1 -
 include/configs/sama5d4ek.h                  |  1 -
 include/configs/siemens-am33x-common.h       |  1 -
 include/configs/smartweb.h                   |  1 -
 include/configs/smdkv310.h                   |  1 -
 include/configs/sniper.h                     |  1 -
 include/configs/socfpga_common.h             |  1 -
 include/configs/sunxi-common.h               |  1 +
 include/configs/taurus.h                     |  1 -
 include/configs/tbs2910.h                    |  1 -
 include/configs/tegra-common-usb-gadget.h    |  1 -
 include/configs/vinco.h                      |  1 -
 include/configs/warp.h                       |  1 -
 include/configs/xilinx_zynqmp.h              |  3 +++
 include/configs/zynq-common.h                |  2 --
 143 files changed, 222 insertions(+), 39 deletions(-)
 create mode 100644 drivers/usb/gadget/Kconfig
configs/am335x_baltos_defconfig +2 -0
index 276a650..96299cf 100644
@@ -13,3 +13,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am335x_boneblack_defconfig +2 -0
index 4ba2579..b4fdb05 100644
@@ -18,3 +18,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am335x_boneblack_vboot_defconfig +2 -0
index 060aa1c..70fc5d7 100644
@@ -24,3 +24,5 @@ CONFIG_DM_ETH=y
 CONFIG_SYS_NS16550=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am335x_evm_defconfig +2 -0
index 836950c..1731ae9 100644
@@ -17,3 +17,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am335x_evm_nor_defconfig +2 -0
index f336dfd..cffa338 100644
@@ -13,3 +13,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am335x_evm_norboot_defconfig +2 -0
index 707014b..921e82f 100644
@@ -10,3 +10,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am335x_evm_spiboot_defconfig +2 -0
index 665dad3..0a2c374 100644
@@ -13,3 +13,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am335x_evm_usbspl_defconfig +2 -0
index 17370bb..ea79368 100644
@@ -13,3 +13,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am335x_gp_evm_defconfig +2 -0
index 7f12972..00c39c4 100644
@@ -19,3 +19,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_RSA=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am437x_gp_evm_defconfig +2 -0
index 1d79ba19..356f6fd 100644
@@ -20,3 +20,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am437x_sk_evm_defconfig +2 -0
index 149a028..037017d 100644
@@ -24,3 +24,5 @@ CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
 CONFIG_DMA=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am43xx_evm_defconfig +2 -0
index 8ef28f3..526255e 100644
@@ -12,3 +12,5 @@ CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am43xx_evm_ethboot_defconfig +2 -0
index 7143597..7aa9a42 100644
@@ -11,3 +11,5 @@ CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am43xx_evm_qspiboot_defconfig +2 -0
index a9a862b..8dc53c4 100644
@@ -10,3 +10,5 @@ CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/am43xx_evm_usbhost_boot_defconfig +2 -0
index 2c73dbe..a2fec65 100644
@@ -11,3 +11,5 @@ CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/apalis_t30_defconfig +1 -0
index b370d6c..c78e4fe 100644
@@ -16,5 +16,6 @@ CONFIG_E1000=y
 CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
 CONFIG_USE_PRIVATE_LIBGCC=y
configs/bcm11130_defconfig +2 -0
index 4b1bc49..222c319 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/bcm11130_nand_defconfig +2 -0
index 2e7aff9..7e1e682 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/bcm28155_ap_defconfig +2 -0
index 7ec0d30..ba57944 100644
@@ -7,3 +7,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/bcm28155_w1d_defconfig +2 -0
index 47eb31d..36849d5 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/beaver_defconfig +1 -0
index fcfbf65..0cc7fba 100644
@@ -19,5 +19,6 @@ CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA20_SLINK=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
 CONFIG_USE_PRIVATE_LIBGCC=y
configs/birdland_bav335a_defconfig +2 -0
index 6d7c20d..a822715 100644
@@ -12,3 +12,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/birdland_bav335b_defconfig +2 -0
index 910ddc7..0f11379 100644
@@ -12,3 +12,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/cgtqmx6eval_defconfig +2 -0
index 8fc8e64..46bb56a 100644
@@ -9,3 +9,5 @@ CONFIG_SYS_PROMPT="CGT-QMX6-Quad U-Boot > "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/colibri_t20_defconfig +1 -0
index 778aae7..cdeeb11 100644
@@ -18,6 +18,7 @@ CONFIG_DM_PWM=y
 CONFIG_PWM_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
 CONFIG_DM_VIDEO=y
 CONFIG_VIDEO_TEGRA20=y
configs/colibri_t30_defconfig +1 -0
index 35b29f9..6cc635c 100644
@@ -14,5 +14,6 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NFS is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
 CONFIG_USE_PRIVATE_LIBGCC=y
configs/colibri_vf_defconfig +2 -0
index 7356b77..cddeaa1 100644
@@ -18,3 +18,5 @@ CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y
 CONFIG_FSL_LPUART=y
 CONFIG_FSL_DSPI=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/corvus_defconfig +2 -0
index 1aabf26..be1d8d7 100644
@@ -11,3 +11,5 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/dalmore_defconfig +1 -0
index 15bd9f1..2197858 100644
@@ -18,5 +18,6 @@ CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
 CONFIG_USE_PRIVATE_LIBGCC=y
configs/dra72_evm_defconfig +2 -0
index 0a5f70b..da24992 100644
@@ -23,3 +23,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/dra74_evm_defconfig +2 -0
index 916016d..9039b15 100644
@@ -22,3 +22,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_TIMER=y
 CONFIG_OMAP_TIMER=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/dra7xx_evm_defconfig +2 -0
index 7aaef1b..15235d9 100644
@@ -14,3 +14,5 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/dra7xx_evm_qspiboot_defconfig +2 -0
index 0789cff..c94b05c 100644
@@ -14,3 +14,5 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/dra7xx_evm_uart3_defconfig +2 -0
index 768920b..cdb3b9d 100644
@@ -15,3 +15,5 @@ CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/draco_defconfig +2 -0
index 967f2ff..f3084e4 100644
@@ -13,3 +13,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/gwventana_defconfig +2 -0
index 686bed6..a4c4003 100644
@@ -17,3 +17,5 @@ CONFIG_DM=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/jetson-tk1_defconfig +1 -0
index c07b278..95b1fc1 100644
@@ -19,5 +19,6 @@ CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
 CONFIG_USE_PRIVATE_LIBGCC=y
configs/kc1_defconfig +1 -0
index 1e5c918..547f2e4 100644
@@ -11,4 +11,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NFS is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_USB_MUSB_GADGET=y
configs/ma5d4evk_defconfig +2 -0
index 378dc30..890410b 100644
@@ -10,3 +10,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4"
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
+ONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/mx6dlsabreauto_defconfig +2 -0
index 46b8a9f..93c2163 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/mx6dlsabresd_defconfig +2 -0
index 45a7ec3..8b17b15 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/mx6qpsabreauto_defconfig +2 -0
index 0877c41..cfbb005 100644
@@ -6,3 +6,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/mx6qsabreauto_defconfig +2 -0
index 36ebc89..81b0443 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/mx6qsabrelite_defconfig +2 -0
index fc8323c..cf6de18 100644
@@ -10,3 +10,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_DM_THERMAL=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/mx6qsabresd_defconfig +2 -0
index 224e6ed..adb10fa 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/mx6sabresd_spl_defconfig +2 -0
index 406777c..d67abf0 100644
@@ -9,3 +9,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/mx7dsabresd_defconfig +2 -0
index 40b0e7e..6b7ce6b 100644
@@ -13,3 +13,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/nitrogen6dl2g_defconfig +2 -0
index 40da15c..704a2b1 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/nitrogen6dl_defconfig +2 -0
index 5f7c17a..f6afe65 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/nitrogen6q2g_defconfig +2 -0
index 8707d7e..08427d1 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/nitrogen6q_defconfig +2 -0
index fbe9b6f..93c41b2 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/nitrogen6s1g_defconfig +2 -0
index 078fc20..afd2b37 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/nitrogen6s_defconfig +2 -0
index 707fb58..594d3c3 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/nyan-big_defconfig +1 -0
index 604aacf..1c9192f 100644
@@ -34,6 +34,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_TPM_TIS_INFINEON=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
 CONFIG_DISPLAY=y
 CONFIG_I2C_EDID=y
configs/odroid-xu3_defconfig +1 -0
index 3b543e8..2b51c93 100644
@@ -18,6 +18,7 @@ CONFIG_DM_PMIC=y
 CONFIG_PMIC_S2MPS11=y
 CONFIG_DM_REGULATOR=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
 CONFIG_VIDEO_BRIDGE=y
 CONFIG_ERRNO_STR=y
configs/odroid_defconfig +1 -0
index 1f4016b..c3dd6eb 100644
@@ -22,5 +22,6 @@ CONFIG_DM_PMIC_MAX77686=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_REGULATOR_MAX77686=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
 CONFIG_ERRNO_STR=y
configs/omap3_beagle_defconfig +2 -0
index 1fb1f71..bba00fb 100644
@@ -8,3 +8,5 @@ CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_CMD_GPIO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/omap3_logic_defconfig +2 -0
index a58b85a..96874d3 100644
@@ -12,3 +12,5 @@ CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_CMD_GPIO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/omap5_uevm_defconfig +2 -0
index cdd80cc..a685feb 100644
@@ -8,3 +8,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/origen_defconfig +1 -0
index 95c8ebc..a66b2c5 100644
@@ -12,4 +12,5 @@ CONFIG_SYS_PROMPT="ORIGEN # "
 # CONFIG_CMD_MISC is not set
 CONFIG_OF_CONTROL=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/p2371-0000_defconfig +1 -0
index 6282acf..d7d2a80 100644
@@ -17,4 +17,5 @@ CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/p2371-2180_defconfig +1 -0
index 392c539..26af6d4 100644
@@ -18,4 +18,5 @@ CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/p2571_defconfig +1 -0
index 04df7e9..f9c8c8d 100644
@@ -17,4 +17,5 @@ CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/pengwyn_defconfig +2 -0
index 97ee71d..52fe100 100644
@@ -7,3 +7,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/pxm2_defconfig +2 -0
index 5b32bb1..dfc28e5 100644
@@ -14,3 +14,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/rastaban_defconfig +2 -0
index 6e7d0d2..913d550 100644
@@ -13,3 +13,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/rut_defconfig +2 -0
index 7a4011e..839ea31 100644
@@ -14,3 +14,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/s5p_goni_defconfig +2 -0
index fc0a45e..eb0604e 100644
@@ -11,3 +11,5 @@ CONFIG_SYS_PROMPT="Goni # "
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/s5pc210_universal_defconfig +1 -0
index 61f6d1f..e72085e 100644
@@ -11,4 +11,5 @@ CONFIG_SYS_PROMPT="Universal # "
 # CONFIG_CMD_MISC is not set
 CONFIG_OF_CONTROL=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/sama5d2_xplained_mmc_defconfig +2 -0
index d6bc70e..c9bcd54 100644
@@ -11,3 +11,5 @@ CONFIG_CMD_SF=y
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/sama5d2_xplained_spiflash_defconfig +2 -0
index eb2f1f0..0f456b4 100644
@@ -11,3 +11,5 @@ CONFIG_CMD_SF=y
 # CONFIG_CMD_FPGA is not set
 CONFIG_SPI_FLASH=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/sama5d3xek_mmc_defconfig +2 -0
index 4a97da1..6589f10 100644
@@ -9,3 +9,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/sama5d3xek_nandflash_defconfig +2 -0
index 968cd66..37b31d7 100644
@@ -9,3 +9,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/sama5d3xek_spiflash_defconfig +2 -0
index bc98e6b..9056f3e 100644
@@ -9,3 +9,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_SERIALFLASH"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/sama5d4_xplained_mmc_defconfig +2 -0
index f1261ab..6df9189 100644
@@ -11,3 +11,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/sama5d4_xplained_nandflash_defconfig +2 -0
index 0e53b32..b78eb0d 100644
@@ -11,3 +11,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/sama5d4_xplained_spiflash_defconfig +2 -0
index a1b2c53..81140c7 100644
@@ -11,3 +11,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/sama5d4ek_mmc_defconfig +2 -0
index bf81f9b..b548c4b 100644
@@ -11,3 +11,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/sama5d4ek_nandflash_defconfig +2 -0
index c78266e..cff422c 100644
@@ -11,3 +11,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/sama5d4ek_spiflash_defconfig +2 -0
index 7c10aab..20efb62 100644
@@ -11,3 +11,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/smartweb_defconfig +2 -0
index 2cb9c71..179f9a1 100644
@@ -9,3 +9,5 @@ CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc><Esc>\" to stop\n"
 CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/sniper_defconfig +1 -0
index 370c5fd..cb762b1 100644
@@ -11,5 +11,6 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NFS is not set
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_USB_MUSB_GADGET=y
 CONFIG_OF_LIBFDT=y
configs/socfpga_arria5_defconfig +1 -0
index 7b60d95..e02d9dd 100644
@@ -25,4 +25,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/socfpga_cyclone5_defconfig +1 -0
index 6a487f4..a4dc686 100644
@@ -25,4 +25,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/socfpga_de0_nano_soc_defconfig +1 -0
index cfcae5d..dd676ad 100644
@@ -20,4 +20,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/socfpga_mcvevk_defconfig +1 -0
index b6f6a65..8ff1d5a 100644
@@ -20,4 +20,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/socfpga_sockit_defconfig +1 -0
index f45c3ed..a5729b8 100644
@@ -25,4 +25,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/socfpga_socrates_defconfig +1 -0
index e25d09b..4935a30 100644
@@ -24,4 +24,5 @@ CONFIG_SYS_NS16550=y
 CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/taurus_defconfig +2 -0
index 0af7f2d..061b334 100644
@@ -15,3 +15,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/tbs2910_defconfig +2 -0
index 3cfa09a..4aceb7f 100644
@@ -9,3 +9,5 @@ CONFIG_CMD_GPIO=y
 CONFIG_DM=y
 CONFIG_DM_THERMAL=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/thuban_defconfig +2 -0
index 666cf5e..cf5332a 100644
@@ -13,3 +13,5 @@ CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/trats2_defconfig +1 -0
index 9c281f8..5704dbd 100644
@@ -14,4 +14,5 @@ CONFIG_SYS_PROMPT="Trats2 # "
 # CONFIG_CMD_MISC is not set
 CONFIG_OF_CONTROL=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/trats_defconfig +1 -0
index eef22a6..d1ce93d 100644
@@ -13,4 +13,5 @@ CONFIG_SYS_PROMPT="Trats # "
 # CONFIG_CMD_MISC is not set
 CONFIG_OF_CONTROL=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
configs/venice2_defconfig +1 -0
index 954c1de..226900c 100644
@@ -18,5 +18,6 @@ CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
 CONFIG_USB=y
+CONFIG_USB_GADGET=y
 CONFIG_DM_USB=y
 CONFIG_USE_PRIVATE_LIBGCC=y
configs/vinco_defconfig +2 -0
index 7cae79b..a16f376 100644
@@ -11,3 +11,5 @@ CONFIG_SYS_PROMPT="vinco => "
 CONFIG_SPI_FLASH=y
 CONFIG_NETDEVICES=y
 CONFIG_ETH_DESIGNWARE=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/warp_defconfig +2 -0
index 959e29c..b68bfff 100644
@@ -9,3 +9,5 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/zynq_picozed_defconfig +2 -0
index f34e2e3..67e38e5 100644
@@ -12,3 +12,5 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ZYNQ_SDHCI=y
 CONFIG_ZYNQ_GEM=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/zynq_zc706_defconfig +2 -0
index 215f00d..d3ae438 100644
@@ -21,3 +21,5 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_ZYNQ_GEM=y
 CONFIG_ZYNQ_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/zynq_zed_defconfig +2 -0
index 4a2a2fc..9ad33ff 100644
@@ -21,3 +21,5 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_ZYNQ_GEM=y
 CONFIG_ZYNQ_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
configs/zynq_zybo_defconfig +2 -0
index 7c23fec..470c9cb 100644
@@ -22,3 +22,5 @@ CONFIG_DEBUG_UART_ZYNQ=y
 CONFIG_DEBUG_UART_BASE=0xe0001000
 CONFIG_DEBUG_UART_CLOCK=50000000
 CONFIG_ZYNQ_QSPI=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
drivers/usb/Kconfig +2 -0
index abb06fc..7fa99c6 100644
@@ -88,4 +88,6 @@ endchoice
 
 endif
 
+source "drivers/usb/gadget/Kconfig"
+
 endif
drivers/usb/gadget/Kconfig new file +35 -0
new file mode 100644
index 0000000..f4698f4
@@ -0,0 +1,35 @@
+#
+# USB Gadget support on a system involves
+#    (a) a peripheral controller, and
+#    (b) the gadget driver using it.
+#
+# NOTE:  Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
+#
+#  - Host systems (like PCs) need CONFIG_USB (with "A" jacks).
+#  - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks).
+#  - Some systems have both kinds of controllers.
+#
+# With help from a special transceiver and a "Mini-AB" jack, systems with
+# both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG).
+#
+
+menuconfig USB_GADGET
+	bool "USB Gadget Support"
+	help
+	   USB is a master/slave protocol, organized with one master
+	   host (such as a PC) controlling up to 127 peripheral devices.
+	   The USB hardware is asymmetric, which makes it easier to set up:
+	   you can't connect a "to-the-host" connector to a peripheral.
+
+	   U-Boot can run in the host, or in the peripheral.  In both cases
+	   you need a low level bus controller driver, and some software
+	   talking to it.  Peripheral controllers are often discrete silicon,
+	   or are integrated with the CPU in a microcontroller.  The more
+	   familiar host side controllers have names like "EHCI", "OHCI",
+	   or "UHCI", and are usually integrated into southbridges on PC
+	   motherboards.
+
+	   Enable this configuration option if you want to run U-Boot inside
+	   a USB peripheral device.  Configure one hardware driver for your
+	   peripheral/device side bus controller, and a "gadget driver" for
+	   your peripheral protocol.
include/configs/am335x_evm.h +0 -1
index 150c523..29b693a 100644
@@ -288,7 +288,6 @@
 #define CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_MUSB_PIO_ONLY
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW	2
include/configs/am43xx_evm.h +0 -1
index b982ed6..fd3f6a7 100644
@@ -129,7 +129,6 @@
 #define CONFIG_USB_DWC3
 #define CONFIG_USB_DWC3_GADGET
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_VBUS_DRAW 2
 #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
include/configs/baltos.h +0 -1
index b8c915c..bfe3fa3 100644
@@ -274,7 +274,6 @@
 #define CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_MUSB_PIO_ONLY
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
-#define CONFIG_USB_GADGET
 #define CONFIG_USBDOWNLOAD_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW	2
include/configs/bav335x.h +0 -1
index a9df0b3..6c860a6 100644
@@ -439,7 +439,6 @@ DEFAULT_LINUX_BOOT_ENV \
 #define CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_MUSB_PIO_ONLY
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW	2
include/configs/bcm28155_ap.h +0 -1
index c9515a8..cf25bde 100644
@@ -138,7 +138,6 @@
 #define CONFIG_SYS_CACHELINE_SIZE	64
 #define CONFIG_FASTBOOT_BUF_SIZE	(CONFIG_SYS_SDRAM_SIZE - SZ_1M)
 #define CONFIG_FASTBOOT_BUF_ADDR	CONFIG_SYS_SDRAM_BASE
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW	0
 #define CONFIG_USB_GADGET_DWC2_OTG
include/configs/cgtqmx6eval.h +0 -1
index 487c011..63e3b94 100644
@@ -90,7 +90,6 @@
 #define CONFIG_USBD_HS
 #define CONFIG_USB_GADGET_DUALSPEED
 
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
include/configs/colibri_vf.h +0 -1
index 9c73cff..7f57a54 100644
@@ -233,7 +233,6 @@
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 
 /* USB Client Support */
-#define CONFIG_USB_GADGET
 #define CONFIG_CI_UDC
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW      2
include/configs/corvus.h +0 -1
index a1fd93f..fcf2bd6 100644
@@ -117,7 +117,6 @@
 #define CONFIG_MTD_DEVICE
 #define CONFIG_MTD_PARTITIONS
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 
include/configs/dra7xx_evm.h +0 -1
index 45bda4f..c0795ab 100644
@@ -231,7 +231,6 @@
 #define CONFIG_USB_DWC3
 #define CONFIG_USB_DWC3_GADGET
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_VBUS_DRAW 2
 #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
include/configs/e2220-1170.h +6 -0
index 33ebb7c..bf5a58f 100644
@@ -54,6 +54,12 @@
 /* General networking support */
 #define CONFIG_CMD_DHCP
 
+/* NOTE: There is no defconfig for this file, so don't touch this section */
+#ifndef CONFIG_SPL_BUILD
+/* USB gadget mode support*/
+#define CONFIG_USB_GADGET
+#endif
+
 #include "tegra-common-usb-gadget.h"
 #include "tegra-common-post.h"
 
include/configs/exynos4-common.h +0 -1
index d101a77..008d24c 100644
@@ -50,7 +50,6 @@
 
 #define CONFIG_SYS_MONITOR_LEN		(256 << 10)	/* Reserve 2 sectors */
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DWC2_OTG
 #define CONFIG_USB_GADGET_DWC2_OTG_PHY
 #define CONFIG_USB_GADGET_DUALSPEED
include/configs/gw_ventana.h +0 -1
index 38c921a..793b3fb 100644
@@ -193,7 +193,6 @@
 #define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP
 
 /* USB Mass Storage Gadget */
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
include/configs/kc1.h +0 -1
index c2ac148..7f828f7 100644
@@ -184,7 +184,6 @@
 #define CONFIG_USB_MUSB_PIO_ONLY
 #define CONFIG_USB_MUSB_OMAP2PLUS
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW	0
 
include/configs/ma5d4evk.h +0 -1
index 7f8a59f..e061a10 100644
@@ -131,7 +131,6 @@
 #define CONFIG_USB_STORAGE
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
include/configs/mx6sabre_common.h +0 -1
index a6d821b..ceea74e 100644
@@ -238,7 +238,6 @@
 #define CONFIG_USBD_HS
 #define CONFIG_USB_GADGET_DUALSPEED
 
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
include/configs/mx7dsabresd.h +0 -1
index 2c981e0..5d897c2 100644
@@ -253,7 +253,6 @@
 #define CONFIG_USBD_HS
 #define CONFIG_USB_GADGET_DUALSPEED
 
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
include/configs/nitrogen6x.h +0 -1
index 3416ce3..3604e44 100644
@@ -330,7 +330,6 @@
 #endif
 
 
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
include/configs/odroid_xu3.h +0 -1
index 500f0f9..01d08dc 100644
@@ -53,7 +53,6 @@
 #define CONFIG_USB_DWC3_PHY_SAMSUNG
 
 /* USB gadget */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW	2
 
include/configs/omap3_beagle.h +0 -1
index 65f08a1..2112d9f 100644
@@ -66,7 +66,6 @@
 #define CONFIG_TWL4030_USB		1
 #define CONFIG_USB_ETHER
 #define CONFIG_USB_ETHER_RNDIS
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_VBUS_DRAW	0
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_G_DNL_VENDOR_NUM		0x0451
include/configs/omap3_logic.h +0 -1
index 0fc9d1c..304e1ce 100644
@@ -85,7 +85,6 @@
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_ETHER
 #define CONFIG_USB_ETHER_RNDIS
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_VBUS_DRAW	0
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_G_DNL_VENDOR_NUM		0x0451
include/configs/omap5_uevm.h +0 -1
index 18a2924..a5cfa0c 100644
@@ -105,7 +105,6 @@
 #define CONFIG_USB_DWC3
 #define CONFIG_USB_DWC3_GADGET
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_VBUS_DRAW 2
 #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
include/configs/pengwyn.h +0 -1
index bfc1c1e..1a670cb 100644
@@ -199,7 +199,6 @@
 #define CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_MUSB_PIO_ONLY
 #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW	2
 #define CONFIG_USB_MUSB_HOST
include/configs/s5p_goni.h +0 -1
index 40fb5ed..07a5134 100644
@@ -270,7 +270,6 @@
 #define CONFIG_SYS_I2C_INIT_BOARD
 
 #define CONFIG_SYS_MAX_I2C_BUS	7
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DWC2_OTG
 #define CONFIG_USB_GADGET_DWC2_OTG_PHY
 #define CONFIG_USB_GADGET_DUALSPEED
include/configs/s5pc210_universal.h +0 -1
index 7bb62ca..ed5365a 100644
@@ -176,7 +176,6 @@
 #define CONFIG_POWER_I2C
 #define CONFIG_POWER_MAX8998
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DWC2_OTG
 #define CONFIG_USB_GADGET_DWC2_OTG_PHY
 #define CONFIG_USB_GADGET_DUALSPEED
include/configs/sama5d2_xplained.h +0 -1
index 272257e..1225aa8 100644
@@ -74,7 +74,6 @@
 #endif
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
include/configs/sama5d3xek.h +0 -1
index bd5f4ee..ed6bafb 100644
@@ -140,7 +140,6 @@
 #endif
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
include/configs/sama5d4_xplained.h +0 -1
index 52b4584..d89609b 100644
@@ -83,7 +83,6 @@
 #endif
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
include/configs/sama5d4ek.h +0 -1
index ce96a7c..3981c23 100644
@@ -83,7 +83,6 @@
 #endif
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
include/configs/siemens-am33x-common.h +0 -1
index 3a8b90e..df2a514 100644
@@ -243,7 +243,6 @@
 #define CONFIG_USBNET_HOST_ADDR	"de:ad:be:af:00:00"
 #endif /* CONFIG_USB_MUSB_GADGET */
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 
 /* USB DRACO ID as default */
include/configs/smartweb.h +0 -1
index d06e648..db820ba 100644
@@ -169,7 +169,6 @@
 #define CONFIG_MTD_DEVICE
 #define CONFIG_MTD_PARTITIONS
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_AT91
 
 /* DFU class support */
include/configs/smdkv310.h +0 -1
index b7ac402..856bf7d 100644
@@ -12,7 +12,6 @@
 #include "exynos4-common.h"
 
 #undef CONFIG_BOARD_COMMON
-#undef CONFIG_USB_GADGET
 #undef CONFIG_USB_GADGET_DWC2_OTG
 #undef CONFIG_USB_GADGET_DWC2_OTG_PHY
 #undef CONFIG_CMD_USB_MASS_STORAGE
include/configs/sniper.h +0 -1
index 171a8c4..45ab21f 100644
@@ -201,7 +201,6 @@
 #define CONFIG_USB_MUSB_OMAP2PLUS
 #define CONFIG_TWL4030_USB
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW	0
 
include/configs/socfpga_common.h +0 -1
index 56d32e6..07519c1 100644
@@ -252,7 +252,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
  * USB Gadget (DFU, UMS)
  */
 #if defined(CONFIG_CMD_DFU) || defined(CONFIG_CMD_USB_MASS_STORAGE)
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DWC2_OTG
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW	2
include/configs/sunxi-common.h +1 -0
index b26363d..96e2b21 100644
@@ -323,6 +323,7 @@ extern int soft_i2c_gpio_scl;
 #define CONFIG_USB_MUSB_PIO_ONLY
 #endif
 
+/* NOTE: There is no defconfig for this file, so don't touch this section */
 #ifdef CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
include/configs/taurus.h +0 -1
index c1581d8..5b190f6 100644
@@ -132,7 +132,6 @@
 #define CONFIG_MTD_DEVICE
 #define CONFIG_MTD_PARTITIONS
 
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_AT91
 
 /* DFU class support */
include/configs/tbs2910.h +0 -1
index 33ac955..1b5046a 100644
@@ -130,7 +130,6 @@
 #ifdef CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_CI_UDC
 #define CONFIG_USBD_HS
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_VBUS_DRAW	0
include/configs/tegra-common-usb-gadget.h +0 -1
index f6e1d5c..c3a0151 100644
@@ -10,7 +10,6 @@
 
 #ifndef CONFIG_SPL_BUILD
 /* USB gadget mode support*/
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_VBUS_DRAW    2
 #define CONFIG_CI_UDC
 #define CONFIG_CI_UDC_HAS_HOSTPC
include/configs/vinco.h +0 -1
index 92b1b4b..5073b9c 100644
@@ -86,7 +86,6 @@
 #endif
 
 /* USB device */
-#define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DUALSPEED
 #define CONFIG_USB_GADGET_ATMEL_USBA
 #define CONFIG_USB_ETHER
include/configs/warp.h +0 -1
index 3e9a5a3..cb93629 100644
@@ -78,7 +78,6 @@
 #define CONFIG_USBD_HS
 #define CONFIG_USB_GADGET_DUALSPEED
 
-#define CONFIG_USB_GADGET
 #define CONFIG_CMD_USB_MASS_STORAGE
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_USB_GADGET_DOWNLOAD
include/configs/xilinx_zynqmp.h +3 -0
index 9d9ffd0..eaa4133 100644
@@ -121,6 +121,9 @@
 #define CONFIG_USB_DWC3
 #define CONFIG_USB_DWC3_GADGET
 
+/* NOTE: There is no defconfig for TARGET_ZYNQMP_EP, so don't touch this
+ * section
+ */
 #define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_DOWNLOAD
 #define CONFIG_USB_GADGET_DUALSPEED
include/configs/zynq-common.h +0 -2
index 77edbb8..9ff3df2 100644
@@ -102,7 +102,6 @@
 # define CONFIG_USB_MAX_CONTROLLER_COUNT	2
 
 # define CONFIG_CI_UDC           /* ChipIdea CI13xxx UDC */
-# define CONFIG_USB_GADGET
 # define CONFIG_USB_GADGET_DUALSPEED
 # define CONFIG_USB_GADGET_DOWNLOAD
 # define CONFIG_SYS_DFU_DATA_BUF_SIZE	0x600000
@@ -113,7 +112,6 @@
 # define CONFIG_G_DNL_VENDOR_NUM	0x03FD
 # define CONFIG_G_DNL_PRODUCT_NUM	0x0300
 # define CONFIG_G_DNL_MANUFACTURER	"Xilinx"
-# define CONFIG_USB_GADGET
 # define CONFIG_USB_CABLE_CHECK
 # define CONFIG_CMD_DFU
 # define CONFIG_CMD_THOR_DOWNLOAD
Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/1 usb: gadget: Move CONFIG_USB_GADGET to Kconfig

Quoted 7 lines · Semen Protsenko

From: Sam Protsenko <[email protected]>

The description was borrowed from kernel. "tristate" type was changed to "bool" (I believe we don't support modules for u-boot yet, right?). CONFIG_USB_GADGET requires CONFIG_USB to be defined too, so add it along as well.

Quoted 8 lines

Some platforms weren't ported though:

     include/configs/e2220-1170.h
     include/configs/sunxi-common.h
     include/configs/xilinx_zynqmp.h

CONFIG_USB_GADGET remains in those files as there is no corresponding defconfig files for those and I don't want to break anything.

That's not true; configs/e2220-1170_defconfig has existed for months. Did you base this change on the latest u-boot/master?

#2 lore raw

PATCH 1/1 usb: gadget: Move CONFIG_USB_GADGET to Kconfig

Quoted 15 lines · Stephen Warren
Quoted 14 lines · Semen Protsenko

From: Sam Protsenko <[email protected]>

The description was borrowed from kernel. "tristate" type was changed to "bool" (I believe we don't support modules for u-boot yet, right?). CONFIG_USB_GADGET requires CONFIG_USB to be defined too, so add it along as well.

Some platforms weren't ported though:

     include/configs/e2220-1170.h
     include/configs/sunxi-common.h
     include/configs/xilinx_zynqmp.h
Quoted 6 lines
Quoted 2 lines

CONFIG_USB_GADGET remains in those files as there is no corresponding defconfig files for those and I don't want to break anything.

That's not true; configs/e2220-1170_defconfig has existed for months. Did you base this change on the latest u-boot/master?

Yes, you are right. I was assuming that each defconfig file must define CONFIG_TARGET_ in order to tie itself to corresponding include/configs/*.h header. It turns out it's not true and I obviously need to check ".config" file for CONFIG_TARGET_* definition after doing "make ..._defconfig". This is because some defconfig files doesn't have CONFIG_TARGET_ definition, but it's enabled as dependency, or as default value, or whatever. Also I think it's good idea to check modified defconfig files for consistency with "make savedefconfig" rule.

I'm going to revise this patch and will submit new version soon.

#3 lore raw

PATCH 1/1 usb: gadget: Move CONFIG_USB_GADGET to Kconfig

Quoted 23 lines · Sam Protsenko
Quoted 15 lines · Stephen Warren
Quoted 14 lines · Semen Protsenko

From: Sam Protsenko <[email protected]>

The description was borrowed from kernel. "tristate" type was changed to "bool" (I believe we don't support modules for u-boot yet, right?). CONFIG_USB_GADGET requires CONFIG_USB to be defined too, so add it along as well.

Some platforms weren't ported though:

      include/configs/e2220-1170.h
      include/configs/sunxi-common.h
      include/configs/xilinx_zynqmp.h
Quoted 6 lines
Quoted 2 lines

CONFIG_USB_GADGET remains in those files as there is no corresponding defconfig files for those and I don't want to break anything.

That's not true; configs/e2220-1170_defconfig has existed for months. Did you base this change on the latest u-boot/master?

Quoted 7 lines

Yes, you are right. I was assuming that each defconfig file must define CONFIG_TARGET_ in order to tie itself to corresponding include/configs/*.h header. It turns out it's not true and I obviously need to check ".config" file for CONFIG_TARGET_* definition after doing "make ..._defconfig". This is because some defconfig files doesn't have CONFIG_TARGET_ definition, but it's enabled as dependency, or as default value, or whatever.

FYI, for unrelated reasons, I checked why e2220-1170_defconfig is the way it is. It's because there's a Kconfig menu in arch/arm/mach-tegra/tegra210/Kconfig, and CONFIG_TARGET_E2220_1170 is indeed the first, and hence default, value.