From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 99941C77B75 for ; Sat, 6 May 2023 14:43:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E841F85EEB; Sat, 6 May 2023 16:42:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683384176; bh=UqMrGFhjTSV7XF8yhCLRjp2Z8A222VgfC/9bPaESuKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=d3jgHgb2tUbQsiaA1lME6KgsBRCa1pF9ky/m/Ysw5I1l2L8mvJqRxS4Fv4Afni3mP 9x+j9x/QAHrXIDIWdPqa2HjYAKw2JI4WeLuMfNyRiYo36BILLEByVCDQos2uLy561+ ZXSCQ8iFSFCkNP34NdIv/j915Z0y0U1prb8yTJDv2NF4EZVpKdZObFIcXYoTkhDA5a LU0WY05WvETqD4cIr+k0JnULpGO4KIhk7rabcUlhdXd67H6XTnHKHi8ISLwdkk4yms dWKkBpXuVAFWDRrfnS3Rqs3R9kEBfzIkkDkCBWeNLxfL9OcGpIK2XqB6rOjmIUCaj0 7wYNaKAHeJedA== Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 5AEF385E6B; Sat, 6 May 2023 16:42:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1683384172; bh=UqMrGFhjTSV7XF8yhCLRjp2Z8A222VgfC/9bPaESuKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uzLmmlLks1AkvJbCwf3otO5MzuHw6otPfhOcUzIjK7BXLb/qtVqTarq8V8DG1L0EG J2b+eM0HkgLm2MJ/7Wqu2Z8n9dF0uHgMuEMvVBymOy3ekk3jrg8Aan5ubeiC/7KicR N34Brzwak18zvaWxAQMvatYikQcKoWqm4qpQoQudbMNqqHnFQ7gSjrf5+edvUDJIBi UziTIteGH9/p9De/ZYTIHLg3XUlp4H+SaIctYgKagk9NOvjWTm1R8i7gFhBO+kGzI+ fwF2W5KANlZ12FGNStQ9dQ7AmmLxWryDqaQoF/Koyr8M3cBg4zGReJZstMu+DbXXgc G7WApjA3dIaJQ== From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Andrew Davis , Chris Packham , Jim Liu , Lukasz Majewski , Samuel Holland , Simon Glass , Stefan Roese , Tom Rini , Weijie Gao Subject: [PATCH 3/4] usb: Move SPL_USB_GADGET and related Kconfig symbols to drivers/usb/ Date: Sat, 6 May 2023 16:42:39 +0200 Message-Id: <20230506144240.10042-3-marex@denx.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230506144240.10042-1-marex@denx.de> References: <20230506144240.10042-1-marex@denx.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean To avoid piling up all the various Kconfig symbols in one place, i.e. common/spl/Kconfig, move the USB Kconfig symbols into drivers/usb/ . This commit moves SPL_USB_GADGET and related symbols. Fix typo and rename SPL_USB_GADGET to "USB Gadget Support in SPL" . Update the gadget Makefile to match the symbol changes. Signed-off-by: Marek Vasut --- Cc: Andrew Davis Cc: Chris Packham Cc: Jim Liu Cc: Lukasz Majewski Cc: Samuel Holland Cc: Simon Glass Cc: Stefan Roese Cc: Tom Rini Cc: Weijie Gao --- common/spl/Kconfig | 63 ------------------------------------ drivers/usb/gadget/Kconfig | 64 +++++++++++++++++++++++++++++++++++++ drivers/usb/gadget/Makefile | 5 ++- 3 files changed, 66 insertions(+), 66 deletions(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 5ad29af21cb..6774ba5b42e 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1345,69 +1345,6 @@ config SPL_THERMAL automatic power-off when the temperature gets too high or low. Other devices may be discrete but connected on a suitable bus. -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 - -config SPL_USB_ETHER - bool "Support USB Ethernet drivers" - depends on SPL_NET - help - Enable access to the USB network subsystem and associated - drivers in SPL. This permits SPL to load U-Boot over a - USB-connected Ethernet link (such as a USB Ethernet dongle) rather - than from an onboard peripheral. Environment support is required - since the network stack uses a number of environment variables. - See also SPL_NET and SPL_ETH. - -config SPL_DFU - bool "Support DFU (Device Firmware Upgrade)" - select SPL_HASH - select SPL_DFU_NO_RESET - depends on SPL_RAM_SUPPORT - help - This feature enables the DFU (Device Firmware Upgrade) in SPL with - RAM memory device support. The ROM code will load and execute - the SPL built with dfu. The user can load binaries (u-boot/kernel) to - selected device partition from host-pc using dfu-utils. - This feature is useful to flash the binaries to factory or bare-metal - boards using USB interface. - -choice - bool "DFU device selection" - depends on SPL_DFU - -config SPL_DFU_RAM - bool "RAM device" - depends on SPL_DFU && SPL_RAM_SUPPORT - help - select RAM/DDR memory device for loading binary images - (u-boot/kernel) to the selected device partition using - DFU and execute the u-boot/kernel from RAM. - -endchoice - -config SPL_USB_SDP_SUPPORT - bool "Support SDP (Serial Download Protocol)" - depends on SPL_SERIAL - help - Enable Serial Download Protocol (SDP) device support in SPL. This - allows to download images into memory and execute (jump to) them - using the same protocol as implemented by the i.MX family's boot ROM. - -config SPL_SDP_USB_DEV - int "SDP USB controller index" - default 0 - depends on SPL_USB_SDP_SUPPORT - help - Some boards have USB controller other than 0. Define this option - so it can be used in compiled environment. -endif - config SPL_WATCHDOG bool "Support watchdog drivers" imply SPL_WDT if !HW_WATCHDOG diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 941f97c96d0..6f85089a9bf 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -36,6 +36,12 @@ menuconfig USB_GADGET peripheral/device side bus controller, and a "gadget driver" for your peripheral protocol. +config SPL_USB_GADGET + bool "USB Gadget Support in SPL" + help + Enable USB Gadget API which allows to enable USB device functions + in SPL. + if USB_GADGET config USB_GADGET_MANUFACTURER @@ -265,3 +271,61 @@ config USBNET_HOST_ADDR endif # USB_ETHER endif # USB_GADGET + +if SPL_USB_GADGET + +config SPL_USB_ETHER + bool "Support USB Ethernet drivers in SPL" + depends on SPL_NET + help + Enable access to the USB network subsystem and associated + drivers in SPL. This permits SPL to load U-Boot over a + USB-connected Ethernet link (such as a USB Ethernet dongle) rather + than from an onboard peripheral. Environment support is required + since the network stack uses a number of environment variables. + See also SPL_NET and SPL_ETH. + +config SPL_DFU + bool "Support DFU (Device Firmware Upgrade) in SPL" + select SPL_HASH + select SPL_DFU_NO_RESET + depends on SPL_RAM_SUPPORT + help + This feature enables the DFU (Device Firmware Upgrade) in SPL with + RAM memory device support. The ROM code will load and execute + the SPL built with dfu. The user can load binaries (u-boot/kernel) to + selected device partition from host-pc using dfu-utils. + This feature is useful to flash the binaries to factory or bare-metal + boards using USB interface. + +choice + bool "DFU device selection in SPL" + depends on SPL_DFU + +config SPL_DFU_RAM + bool "RAM device" + depends on SPL_DFU && SPL_RAM_SUPPORT + help + select RAM/DDR memory device for loading binary images + (u-boot/kernel) to the selected device partition using + DFU and execute the u-boot/kernel from RAM. + +endchoice + +config SPL_USB_SDP_SUPPORT + bool "Support SDP (Serial Download Protocol) in SPL" + depends on SPL_SERIAL + help + Enable Serial Download Protocol (SDP) device support in SPL. This + allows to download images into memory and execute (jump to) them + using the same protocol as implemented by the i.MX family's boot ROM. + +config SPL_SDP_USB_DEV + int "SDP USB controller index in SPL" + default 0 + depends on SPL_USB_SDP_SUPPORT + help + Some boards have USB controller other than 0. Define this option + so it can be used in compiled environment. + +endif # SPL_USB_GADGET diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile index 6cfe0f3a041..a9edeb9f396 100644 --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile @@ -3,8 +3,8 @@ # (C) Copyright 2000-2007 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. -obj-$(CONFIG_USB_GADGET) += epautoconf.o config.o usbstring.o -obj-$(CONFIG_USB_ETHER) += epautoconf.o config.o usbstring.o +obj-$(CONFIG_$(SPL_TPL_)USB_GADGET) += epautoconf.o config.o usbstring.o +obj-$(CONFIG_$(SPL_TPL_)USB_ETHER) += epautoconf.o config.o usbstring.o ether.o ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_USB_GADGET) += g_dnl.o @@ -34,7 +34,6 @@ endif obj-$(CONFIG_CI_UDC) += ci_udc.o -obj-$(CONFIG_USB_ETHER) += ether.o obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o # Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE -- 2.39.2