From patchwork Mon Apr 11 15:27:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 65535 Delivered-To: patch@linaro.org Received: by 10.112.43.237 with SMTP id z13csp1540524lbl; Mon, 11 Apr 2016 08:28:39 -0700 (PDT) X-Received: by 10.28.26.73 with SMTP id a70mr19632145wma.89.1460388519001; Mon, 11 Apr 2016 08:28:39 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id s136si18949951wme.28.2016.04.11.08.28.38; Mon, 11 Apr 2016 08:28:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E7E87A76E0; Mon, 11 Apr 2016 17:28:24 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ln90av-fRS7C; Mon, 11 Apr 2016 17:28:24 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9454FA75DC; Mon, 11 Apr 2016 17:28:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D4710A761D for ; Mon, 11 Apr 2016 17:28:03 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bwr9FTa5li93 for ; Mon, 11 Apr 2016 17:28:03 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) by theia.denx.de (Postfix) with ESMTPS id 2BF1FA76A0 for ; Mon, 11 Apr 2016 17:27:59 +0200 (CEST) Received: by mail-lf0-f43.google.com with SMTP id j11so161689196lfb.1 for ; Mon, 11 Apr 2016 08:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7Uhty7X3d0FDd76U6gxdJYJrYVske5OhhemYsvt67+Q=; b=KCf3sslTCmDLuh6MP+nL/eQ8bPFqfrm5ueF5qPFnxLgQUMkZDNhDRRQksXqpFbbN2L z9mEvBmXZsaV2kxwnnydKl8UoNejLaFZP3gKTlrLQZAmOdGJ0MUh7OAgiBDEjDcnMxd9 1PKFEIzKL53gqySzLa05l8igb7A5qnNh8V/ms= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7Uhty7X3d0FDd76U6gxdJYJrYVske5OhhemYsvt67+Q=; b=I023eMTLTWt0HixrpF5KAGfOd2llSBpj4xlD1tJUbT3cGL9c8dwyirIc+HMYlPcKy0 RaNy857hfGBs2bnfxLNbvNFbKBPAItwQc0gi4C+3XhAJ0psZ/MzMa8YoAijdg/MwaGrE bclKXaRK+OTHg+I3le2PBqWd15xc8jWSv4vafw9MdDmEmNeUoJ3tV+9vJCEsp87+9GS8 3plfNN2UySV5YM1ZASMrMb8HhIhVY+fNMOjt6KmsQNPqfom10Xqo41RCUYwHpBvyJTaJ cYlyzOfWICpiqUB/lRloL0bZN1mESvJLmk8EMilP9V0PjW28FN+XczmNtkqdWix7ooun JueQ== X-Gm-Message-State: AD7BkJLoN/krO91j6PsmaeLRzHvyzoBxIED0hB8d53SBZnOjg8HEwn65jcSME/2L1RSQ8/zD X-Received: by 10.25.3.205 with SMTP id 196mr7048541lfd.115.1460388478653; Mon, 11 Apr 2016 08:27:58 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id z142sm4869669lff.21.2016.04.11.08.27.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Apr 2016 08:27:58 -0700 (PDT) From: Semen Protsenko To: u-boot@lists.denx.de Date: Mon, 11 Apr 2016 18:27:44 +0300 Message-Id: <1460388467-9580-5-git-send-email-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1460388467-9580-1-git-send-email-semen.protsenko@linaro.org> References: <1460388467-9580-1-git-send-email-semen.protsenko@linaro.org> Cc: Steve Rae , Tom Rini , Marek Vasut , Stephen Warren , Otavio Salvador , Praneeth Bajjuri , Adrian Alonso , Roger Meier , Chin-Liang See , Fabio Estevam , Lucas Stach , Stefan Roese Subject: [U-Boot] [PATCH 4/7 v3] usb: dwc3: Move CONFIG_USB_DWC3_GADGET/HOST to Kconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Sam Protsenko Description was borrowed from kernel dwc3 Kconfig. Signed-off-by: Sam Protsenko --- 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/dwc3/Kconfig | 23 +++++++++++++++++++++++ include/configs/am43xx_evm.h | 2 +- include/configs/dra7xx_evm.h | 1 - include/configs/odroid_xu3.h | 1 - include/configs/omap5_uevm.h | 1 - include/configs/xilinx_zynqmp.h | 2 -- 20 files changed, 38 insertions(+), 6 deletions(-) -- 2.8.0.rc3 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig index b02f8ad..8dc905e 100644 --- a/configs/am437x_gp_evm_defconfig +++ b/configs/am437x_gp_evm_defconfig @@ -22,5 +22,6 @@ CONFIG_TIMER=y CONFIG_OMAP_TIMER=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig index 1960429..33cc903 100644 --- a/configs/am437x_sk_evm_defconfig +++ b/configs/am437x_sk_evm_defconfig @@ -26,5 +26,6 @@ CONFIG_TIMER=y CONFIG_OMAP_TIMER=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig index 942a6a0..5406beb 100644 --- a/configs/am43xx_evm_defconfig +++ b/configs/am43xx_evm_defconfig @@ -13,6 +13,7 @@ CONFIG_SYS_NS16550=y CONFIG_TI_QSPI=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_OF_LIBFDT=y diff --git a/configs/am43xx_evm_ethboot_defconfig b/configs/am43xx_evm_ethboot_defconfig index 114d10f..fa01c75 100644 --- a/configs/am43xx_evm_ethboot_defconfig +++ b/configs/am43xx_evm_ethboot_defconfig @@ -12,6 +12,7 @@ CONFIG_SYS_NS16550=y CONFIG_TI_QSPI=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_OF_LIBFDT=y diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig index 52265c3..76d2e72 100644 --- a/configs/am43xx_evm_qspiboot_defconfig +++ b/configs/am43xx_evm_qspiboot_defconfig @@ -11,6 +11,7 @@ CONFIG_SYS_NS16550=y CONFIG_TI_QSPI=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_OF_LIBFDT=y diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig index 9166848..c437b3a 100644 --- a/configs/am43xx_evm_usbhost_boot_defconfig +++ b/configs/am43xx_evm_usbhost_boot_defconfig @@ -12,6 +12,7 @@ CONFIG_SYS_NS16550=y CONFIG_TI_QSPI=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_OF_LIBFDT=y diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig index b2276a9..9fdd842 100644 --- a/configs/dra72_evm_defconfig +++ b/configs/dra72_evm_defconfig @@ -25,5 +25,6 @@ CONFIG_TIMER=y CONFIG_OMAP_TIMER=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig index 7aa8233..810db5b 100644 --- a/configs/dra74_evm_defconfig +++ b/configs/dra74_evm_defconfig @@ -24,5 +24,6 @@ CONFIG_TIMER=y CONFIG_OMAP_TIMER=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig index 160ce93..88bf379 100644 --- a/configs/dra7xx_evm_defconfig +++ b/configs/dra7xx_evm_defconfig @@ -15,6 +15,7 @@ CONFIG_SYS_NS16550=y CONFIG_TI_QSPI=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_OF_LIBFDT=y diff --git a/configs/dra7xx_evm_qspiboot_defconfig b/configs/dra7xx_evm_qspiboot_defconfig index 4b4fd27..80961f7 100644 --- a/configs/dra7xx_evm_qspiboot_defconfig +++ b/configs/dra7xx_evm_qspiboot_defconfig @@ -15,6 +15,7 @@ CONFIG_SYS_NS16550=y CONFIG_TI_QSPI=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_OF_LIBFDT=y diff --git a/configs/dra7xx_evm_uart3_defconfig b/configs/dra7xx_evm_uart3_defconfig index c86cedc..f187083 100644 --- a/configs/dra7xx_evm_uart3_defconfig +++ b/configs/dra7xx_evm_uart3_defconfig @@ -16,6 +16,7 @@ CONFIG_SYS_NS16550=y CONFIG_TI_QSPI=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_OF_LIBFDT=y diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig index da92b2d..cb6035b 100644 --- a/configs/odroid-xu3_defconfig +++ b/configs/odroid-xu3_defconfig @@ -20,6 +20,7 @@ CONFIG_DM_REGULATOR=y CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_VIDEO_BRIDGE=y diff --git a/configs/omap5_uevm_defconfig b/configs/omap5_uevm_defconfig index 024de72..5ab2b9d 100644 --- a/configs/omap5_uevm_defconfig +++ b/configs/omap5_uevm_defconfig @@ -9,6 +9,7 @@ CONFIG_CMD_GPIO=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_OF_LIBFDT=y diff --git a/configs/xilinx_zynqmp_ep_defconfig b/configs/xilinx_zynqmp_ep_defconfig index 8f8776d..34cff0c 100644 --- a/configs/xilinx_zynqmp_ep_defconfig +++ b/configs/xilinx_zynqmp_ep_defconfig @@ -31,6 +31,7 @@ CONFIG_NAND_ARASAN=y CONFIG_ZYNQ_GEM=y CONFIG_USB=y CONFIG_USB_DWC3=y +CONFIG_USB_DWC3_GADGET=y CONFIG_USB_GADGET=y CONFIG_USB_GADGET_DOWNLOAD=y # CONFIG_REGEX is not set diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index debc74b..c0251b1 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -5,3 +5,26 @@ config USB_DWC3 help Say Y here if your system has a Dual Role SuperSpeed USB controller based on the DesignWare USB3 IP Core. + +if USB_DWC3 + +choice + bool "DWC3 Mode Selection" + +config USB_DWC3_HOST + bool "Host only mode" + depends on USB + help + Select this when you want to use DWC3 in host mode only, + thereby the gadget feature will be regressed. + +config USB_DWC3_GADGET + bool "Gadget only mode" + depends on USB_GADGET + help + Select this when you want to use DWC3 in gadget mode only, + thereby the host feature will be regressed. + +endchoice + +endif diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h index 3643489..5e0f65d 100644 --- a/include/configs/am43xx_evm.h +++ b/include/configs/am43xx_evm.h @@ -124,6 +124,7 @@ /* USB GADGET */ #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_USBETH_SUPPORT) #undef CONFIG_USB_DWC3 +#undef CONFIG_USB_DWC3_GADGET #undef CONFIG_USB_GADGET_DOWNLOAD #undef CONFIG_USB_GADGET_VBUS_DRAW @@ -134,7 +135,6 @@ (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)) #define CONFIG_USB_DWC3_PHY_OMAP #define CONFIG_USB_DWC3_OMAP -#define CONFIG_USB_DWC3_GADGET #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments" #define CONFIG_G_DNL_VENDOR_NUM 0x0403 diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index 70c25bf..3fb97e8 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -229,7 +229,6 @@ /* USB GADGET */ #define CONFIG_USB_DWC3_PHY_OMAP #define CONFIG_USB_DWC3_OMAP -#define CONFIG_USB_DWC3_GADGET #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments" #define CONFIG_G_DNL_VENDOR_NUM 0x0451 diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h index 7e91f61..57e20e7 100644 --- a/include/configs/odroid_xu3.h +++ b/include/configs/odroid_xu3.h @@ -48,7 +48,6 @@ #define CONFIG_USB_EHCI_EXYNOS /* DWC3 */ -#define CONFIG_USB_DWC3_GADGET #define CONFIG_USB_DWC3_PHY_SAMSUNG /* Downloader */ diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h index 8a98934..6853260 100644 --- a/include/configs/omap5_uevm.h +++ b/include/configs/omap5_uevm.h @@ -102,7 +102,6 @@ /* USB GADGET */ #define CONFIG_USB_DWC3_PHY_OMAP #define CONFIG_USB_DWC3_OMAP -#define CONFIG_USB_DWC3_GADGET #define CONFIG_G_DNL_MANUFACTURER "Texas Instruments" #define CONFIG_G_DNL_VENDOR_NUM 0x0403 diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h index b4f41cc..d877eeb 100644 --- a/include/configs/xilinx_zynqmp.h +++ b/include/configs/xilinx_zynqmp.h @@ -125,8 +125,6 @@ #define CONFIG_USB_STORAGE #define CONFIG_USB_XHCI_ZYNQMP -#define CONFIG_USB_DWC3_GADGET - #define CONFIG_SYS_DFU_DATA_BUF_SIZE 0x1800000 #define DFU_DEFAULT_POLL_TIMEOUT 300 #define CONFIG_USB_FUNCTION_DFU