From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Cc: Marek Vasut <marex@denx.de>, Andrew Davis <afd@ti.com>,
Chris Packham <judge.packham@gmail.com>,
Jim Liu <jim.t90615@gmail.com>, Lukasz Majewski <lukma@denx.de>,
Samuel Holland <samuel@sholland.org>,
Simon Glass <sjg@chromium.org>, Stefan Roese <sr@denx.de>,
Tom Rini <trini@konsulko.com>,
Weijie Gao <weijie.gao@mediatek.com>
Subject: [PATCH 4/4] usb: gadget: Add and use matching SPL USB ethernet gadget Kconfig symbols
Date: Sat, 6 May 2023 16:42:40 +0200 [thread overview]
Message-ID: <20230506144240.10042-4-marex@denx.de> (raw)
In-Reply-To: <20230506144240.10042-1-marex@denx.de>
Define SPL_USB_ETH_RNDIS symbol to make it possible to select USB
gadget ethernet support in SPL and U-Boot separately in Kconfig .
Make use of the new symbols in gadget Makefile and move the rndis.o
just below the now merged USB_ETHER symbol in Makefile.
Signed-off-by: Marek Vasut <marex@denx.de>
---
Cc: Andrew Davis <afd@ti.com>
Cc: Chris Packham <judge.packham@gmail.com>
Cc: Jim Liu <jim.t90615@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>
Cc: Samuel Holland <samuel@sholland.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/usb/gadget/Kconfig | 24 ++++++++++++++++++++++++
drivers/usb/gadget/Makefile | 3 +--
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 6f85089a9bf..1cfe6022842 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -285,6 +285,30 @@ config SPL_USB_ETHER
since the network stack uses a number of environment variables.
See also SPL_NET and SPL_ETH.
+if SPL_USB_ETHER
+
+choice
+ prompt "USB Ethernet Gadget Model in SPL"
+ default SPL_USB_ETH_RNDIS
+ help
+ There is several models (protocols) to implement Ethernet over USB
+ devices. The main ones are Microsoft's RNDIS and USB's CDC-Ethernet
+ (also called CDC-ECM). RNDIS is obviously compatible with Windows,
+ while CDC-ECM is not. Most other operating systems support both, so
+ if inter-operability is a concern, RNDIS is to be preferred.
+
+config SPL_USB_ETH_RNDIS
+ bool "RNDIS Protocol"
+ help
+ The RNDIS (Remote Network Driver Interface Specification) is a
+ Microsoft proprietary protocol to create an Ethernet device over USB.
+ Windows obviously supports it, as well as all the major operating
+ systems, so it's the best option for compatibility.
+
+endchoice
+
+endif # SPL_USB_ETHER
+
config SPL_DFU
bool "Support DFU (Device Firmware Upgrade) in SPL"
select SPL_HASH
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index a9edeb9f396..6abcce0d9c7 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -5,6 +5,7 @@
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
+obj-$(CONFIG_$(SPL_TPL_)USB_ETH_RNDIS) += rndis.o
ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_SPL_USB_GADGET) += g_dnl.o
@@ -34,8 +35,6 @@ endif
obj-$(CONFIG_CI_UDC) += ci_udc.o
-obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
-
# Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
# This is really only N900 and USBTTY now.
obj-$(CONFIG_USB_DEVICE) += core.o ep0.o
--
2.39.2
next prev parent reply other threads:[~2023-05-06 14:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-06 14:42 [PATCH 1/4] usb: Move SPL_USB_HOST Kconfig symbol to drivers/usb/ Marek Vasut
2023-05-06 14:42 ` [PATCH 2/4] usb: Move SPL_USB_STORAGE " Marek Vasut
2023-05-16 20:21 ` Tom Rini
2023-05-06 14:42 ` [PATCH 3/4] usb: Move SPL_USB_GADGET and related Kconfig symbols " Marek Vasut
2023-05-16 20:21 ` Tom Rini
2023-05-06 14:42 ` Marek Vasut [this message]
2023-05-16 20:21 ` [PATCH 4/4] usb: gadget: Add and use matching SPL USB ethernet gadget Kconfig symbols Tom Rini
2023-05-16 20:21 ` [PATCH 1/4] usb: Move SPL_USB_HOST Kconfig symbol to drivers/usb/ Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230506144240.10042-4-marex@denx.de \
--to=marex@denx.de \
--cc=afd@ti.com \
--cc=jim.t90615@gmail.com \
--cc=judge.packham@gmail.com \
--cc=lukma@denx.de \
--cc=samuel@sholland.org \
--cc=sjg@chromium.org \
--cc=sr@denx.de \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=weijie.gao@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.