[U-Boot] [PATCH 3/8] usb: dwc3: Move CONFIG_USB_DWC3 to Kconfig
Semen Protsenko
semen.protsenko at linaro.org
Tue Apr 5 18:36:32 CEST 2016
From: Sam Protsenko <semen.protsenko at linaro.org>
Also remove CONFIG_USB_GADGET_DUALSPEED from headers that use DWC3
controller, as this option is selected by CONFIG_USB_DWC3.
Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
---
configs/am437x_gp_evm_defconfig | 1 +
configs/am437x_sk_evm_defconfig | 1 +
configs/am43xx_evm_defconfig | 1 +
configs/am43xx_evm_ethboot_defconfig | 1 +
configs/am43xx_evm_qspiboot_defconfig | 1 +
configs/am43xx_evm_usbhost_boot_defconfig | 1 +
configs/dra72_evm_defconfig | 1 +
configs/dra74_evm_defconfig | 1 +
configs/dra7xx_evm_defconfig | 1 +
configs/dra7xx_evm_qspiboot_defconfig | 1 +
configs/dra7xx_evm_uart3_defconfig | 1 +
configs/odroid-xu3_defconfig | 1 +
configs/omap5_uevm_defconfig | 1 +
configs/xilinx_zynqmp_ep_defconfig | 1 +
drivers/usb/Kconfig | 2 ++
drivers/usb/dwc3/Kconfig | 7 +++++++
include/configs/am43xx_evm.h | 5 +++--
include/configs/dra7xx_evm.h | 2 --
include/configs/odroid_xu3.h | 4 ----
include/configs/omap5_uevm.h | 2 --
include/configs/xilinx_zynqmp.h | 2 --
21 files changed, 26 insertions(+), 12 deletions(-)
create mode 100644 drivers/usb/dwc3/Kconfig
diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index 356f6fd..e628bd4 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -21,4 +21,5 @@ CONFIG_TI_QSPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index 2e2827f..d556a7f 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -25,4 +25,5 @@ CONFIG_TI_QSPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index cc83006..9b746bf 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -12,5 +12,6 @@ CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_ethboot_defconfig b/configs/am43xx_evm_ethboot_defconfig
index a720c14..30a344c 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -11,5 +11,6 @@ CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig
index 6db389b..75c75dc 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -10,5 +10,6 @@ CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
index cbaf5a5..9c2234f 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -11,5 +11,6 @@ CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index da24992..47fb0d7 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -24,4 +24,5 @@ CONFIG_TI_QSPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index 9039b15..a15b65b 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -23,4 +23,5 @@ CONFIG_TI_QSPI=y
CONFIG_TIMER=y
CONFIG_OMAP_TIMER=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 9be4c2d..2d504a5 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -14,5 +14,6 @@ CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_qspiboot_defconfig b/configs/dra7xx_evm_qspiboot_defconfig
index b77c7c3..6af9619 100644
--- a/configs/dra7xx_evm_qspiboot_defconfig
+++ b/configs/dra7xx_evm_qspiboot_defconfig
@@ -14,5 +14,6 @@ CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/dra7xx_evm_uart3_defconfig b/configs/dra7xx_evm_uart3_defconfig
index 1a1fb6d..80ae9dd 100644
--- a/configs/dra7xx_evm_uart3_defconfig
+++ b/configs/dra7xx_evm_uart3_defconfig
@@ -15,5 +15,6 @@ CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SYS_NS16550=y
CONFIG_TI_QSPI=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig
index a5f25cd..4548cf0 100644
--- a/configs/odroid-xu3_defconfig
+++ b/configs/odroid-xu3_defconfig
@@ -19,6 +19,7 @@ CONFIG_PMIC_S2MPS11=y
CONFIG_DM_REGULATOR=y
CONFIG_USB=y
CONFIG_DM_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
CONFIG_VIDEO_BRIDGE=y
CONFIG_ERRNO_STR=y
diff --git a/configs/omap5_uevm_defconfig b/configs/omap5_uevm_defconfig
index 50d8372..3fc75df 100644
--- a/configs/omap5_uevm_defconfig
+++ b/configs/omap5_uevm_defconfig
@@ -8,5 +8,6 @@ CONFIG_CMD_GPIO=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_SYS_NS16550=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/xilinx_zynqmp_ep_defconfig b/configs/xilinx_zynqmp_ep_defconfig
index 91ae10a..da7d259 100644
--- a/configs/xilinx_zynqmp_ep_defconfig
+++ b/configs/xilinx_zynqmp_ep_defconfig
@@ -30,5 +30,6 @@ CONFIG_ZYNQ_SDHCI=y
CONFIG_NAND_ARASAN=y
CONFIG_ZYNQ_GEM=y
CONFIG_USB=y
+CONFIG_USB_DWC3=y
CONFIG_USB_GADGET=y
# CONFIG_REGEX is not set
diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
index bccf43e..da3ec2f 100644
--- a/drivers/usb/Kconfig
+++ b/drivers/usb/Kconfig
@@ -49,6 +49,8 @@ config DM_USB
source "drivers/usb/host/Kconfig"
+source "drivers/usb/dwc3/Kconfig"
+
source "drivers/usb/musb-new/Kconfig"
source "drivers/usb/emul/Kconfig"
diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig
new file mode 100644
index 0000000..debc74b
--- /dev/null
+++ b/drivers/usb/dwc3/Kconfig
@@ -0,0 +1,7 @@
+config USB_DWC3
+ bool "DesignWare USB3 DRD Core Support"
+ depends on (USB && USB_GADGET)
+ select USB_GADGET_DUALSPEED
+ help
+ Say Y here if your system has a Dual Role SuperSpeed
+ USB controller based on the DesignWare USB3 IP Core.
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index 0dd9c7a7..8bea4c2 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -123,21 +123,22 @@
/* USB GADGET */
#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_USBETH_SUPPORT)
+#undef CONFIG_USB_DWC3
+
#undef CONFIG_USB_GADGET_VBUS_DRAW
+#undef CONFIG_USB_GADGET_DUALSPEED
#endif
#if !defined(CONFIG_SPL_BUILD) || \
(defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT))
#define CONFIG_USB_DWC3_PHY_OMAP
#define CONFIG_USB_DWC3_OMAP
-#define CONFIG_USB_DWC3
#define CONFIG_USB_DWC3_GADGET
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
#define CONFIG_G_DNL_VENDOR_NUM 0x0403
#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
-#define CONFIG_USB_GADGET_DUALSPEED
#endif
/*
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index e9facae..a230896 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -229,14 +229,12 @@
/* USB GADGET */
#define CONFIG_USB_DWC3_PHY_OMAP
#define CONFIG_USB_DWC3_OMAP
-#define CONFIG_USB_DWC3
#define CONFIG_USB_DWC3_GADGET
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
#define CONFIG_G_DNL_VENDOR_NUM 0x0451
#define CONFIG_G_DNL_PRODUCT_NUM 0xd022
-#define CONFIG_USB_GADGET_DUALSPEED
/* USB Device Firmware Update support */
#define CONFIG_USB_FUNCTION_DFU
diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
index e4986b0..e704bb4 100644
--- a/include/configs/odroid_xu3.h
+++ b/include/configs/odroid_xu3.h
@@ -48,13 +48,9 @@
#define CONFIG_USB_EHCI_EXYNOS
/* DWC3 */
-#define CONFIG_USB_DWC3
#define CONFIG_USB_DWC3_GADGET
#define CONFIG_USB_DWC3_PHY_SAMSUNG
-/* USB gadget */
-#define CONFIG_USB_GADGET_DUALSPEED
-
/* Downloader */
#define CONFIG_G_DNL_VENDOR_NUM 0x04E8
#define CONFIG_G_DNL_PRODUCT_NUM 0x6601
diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
index 09beb74..85e46b4 100644
--- a/include/configs/omap5_uevm.h
+++ b/include/configs/omap5_uevm.h
@@ -102,14 +102,12 @@
/* USB GADGET */
#define CONFIG_USB_DWC3_PHY_OMAP
#define CONFIG_USB_DWC3_OMAP
-#define CONFIG_USB_DWC3
#define CONFIG_USB_DWC3_GADGET
#define CONFIG_USB_GADGET_DOWNLOAD
#define CONFIG_G_DNL_MANUFACTURER "Texas Instruments"
#define CONFIG_G_DNL_VENDOR_NUM 0x0403
#define CONFIG_G_DNL_PRODUCT_NUM 0xBD00
-#define CONFIG_USB_GADGET_DUALSPEED
/* USB Device Firmware Update support */
#define CONFIG_USB_FUNCTION_DFU
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 3a96483..e0bde12 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -125,11 +125,9 @@
#define CONFIG_USB_STORAGE
#define CONFIG_USB_XHCI_ZYNQMP
-#define CONFIG_USB_DWC3
#define CONFIG_USB_DWC3_GADGET
#define CONFIG_USB_GADGET_DOWNLOAD
-#define CONFIG_USB_GADGET_DUALSPEED
#define CONFIG_USBDOWNLOAD_GADGET
#define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x1800000
#define DFU_DEFAULT_POLL_TIMEOUT 300
--
2.8.0.rc3
More information about the U-Boot
mailing list