usb: gadget: usb_ether: Move the interfaces to Kconfig

We need to select an interface for the usb_ether gadget, and they haven't
been converted to Kconfig yet. Add a choice to make sure we have an option
selected, and convert all the users.

Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
This commit is contained in:
Maxime Ripard 2017-09-07 08:46:14 +02:00
parent 3f33d3c8f4
commit d2f0f4af4b
31 changed files with 43 additions and 32 deletions

View file

@ -69,6 +69,7 @@ CONFIG_G_DNL_MANUFACTURER="Gateworks"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_SMSC95XX=y

View file

@ -73,6 +73,7 @@ CONFIG_G_DNL_MANUFACTURER="Gateworks"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_SMSC95XX=y

View file

@ -72,6 +72,7 @@ CONFIG_G_DNL_MANUFACTURER="Gateworks"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_SMSC95XX=y

View file

@ -55,5 +55,6 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y

View file

@ -52,5 +52,6 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y

View file

@ -52,5 +52,6 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y

View file

@ -53,5 +53,6 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y

View file

@ -53,5 +53,6 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y

View file

@ -52,5 +52,6 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y

View file

@ -52,5 +52,6 @@ CONFIG_G_DNL_MANUFACTURER="Boundary"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
# CONFIG_VIDEO_SW_CURSOR is not set
CONFIG_OF_LIBFDT=y

View file

@ -49,6 +49,7 @@ CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
CONFIG_USB_GADGET=y
CONFIG_CI_UDC=y
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
CONFIG_USB_HOST_ETHER=y
CONFIG_USB_ETHER_ASIX=y
CONFIG_USB_ETHER_SMSC95XX=y

View file

@ -33,4 +33,5 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_GADGET=y
CONFIG_CI_UDC=y
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
CONFIG_OF_LIBFDT=y

View file

@ -39,5 +39,6 @@ CONFIG_G_DNL_MANUFACTURER="FSL"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
CONFIG_OF_LIBFDT=y

View file

@ -37,5 +37,6 @@ CONFIG_G_DNL_MANUFACTURER="FSL"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
CONFIG_OF_LIBFDT=y

View file

@ -32,4 +32,5 @@ CONFIG_USB_EHCI_HCD=y
CONFIG_USB_GADGET=y
CONFIG_CI_UDC=y
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
CONFIG_OF_LIBFDT=y

View file

@ -133,6 +133,34 @@ config USB_ETHER
if USB_ETHER
choice
prompt "USB Ethernet Gadget Model"
default 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 USB_ETH_CDC
bool "CDC-ECM Protocol"
help
CDC (Communications Device Class) is the standard for Ethernet over
USB devices. While there's several alternatives, the most widely used
protocol is ECM (Ethernet Control Model). However, compatibility with
Windows is not that great.
config 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
config USBNET_DEVADDR
string "USB Gadget Ethernet device mac address"
default "de:ad:be:ef:00:01"

View file

@ -263,10 +263,6 @@
#define CONFIG_AM335X_USB1
#define CONFIG_AM335X_USB1_MODE MUSB_HOST
#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_ETH_RNDIS
#endif /* CONFIG_USB_MUSB_GADGET */
/*
* Disable MMC DM for SPL build and can be re-enabled after adding
* DM support in SPL

View file

@ -55,10 +55,6 @@
#endif /* CONFIG_USB_MUSB_HOST */
#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_ETH_RNDIS
#endif /* CONFIG_USB_MUSB_GADGET */
#endif /* CONFIG_USB_MUSB_AM35X */
/* I2C */

View file

@ -283,10 +283,6 @@
#define CONFIG_AM335X_USB1
#define CONFIG_AM335X_USB1_MODE MUSB_OTG
#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_ETH_RNDIS
#endif /* CONFIG_USB_MUSB_GADGET */
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
/* disable host part of MUSB in SPL */
/* disable EFI partitions and partition UUID support */

View file

@ -146,7 +146,6 @@
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
#define CONFIG_MXC_USB_FLAGS 0
#define CONFIG_USBD_HS
#define CONFIG_USB_ETH_CDC
#define CONFIG_NETCONSOLE
/* USB Mass Storage Gadget */

View file

@ -100,7 +100,6 @@
#ifdef CONFIG_CMD_USB
/* USB device */
#define CONFIG_USB_ETH_RNDIS
#define CONFIG_USBNET_MANUFACTURER "AriesEmbedded"
#define CONFIG_USB_FUNCTION_MASS_STORAGE
#define CONFIG_SYS_DFU_DATA_BUF_SIZE (1 * 1024 * 1024)

View file

@ -19,7 +19,6 @@
#define CONFIG_MISC_INIT_R
#define CONFIG_USBD_HS
#define CONFIG_USB_ETH_CDC
#define CONFIG_NETCONSOLE
#define CONFIG_MXC_UART

View file

@ -129,7 +129,6 @@
#define CONFIG_MXC_USB_FLAGS 0
/* Gadget part */
#define CONFIG_USBD_HS
#define CONFIG_USB_ETH_CDC
#define CONFIG_NETCONSOLE
#endif

View file

@ -133,10 +133,6 @@
#define CONFIG_AM335X_USB1
#define CONFIG_AM335X_USB1_MODE MUSB_HOST
#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_ETH_RNDIS
#endif /* CONFIG_USB_MUSB_GADGET */
#define CONFIG_PHY_SMSC
#endif /* ! __CONFIG_PCM051_H */

View file

@ -62,7 +62,6 @@
#endif
/* USB device */
#define CONFIG_USB_ETH_RNDIS
#define CONFIG_USBNET_MANUFACTURER "Atmel SAMA5D2_PTC"
/* Ethernet Hardware */

View file

@ -39,7 +39,6 @@
#define CONFIG_EHCI_MXS_PORT0
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
#define CONFIG_USB_ETH_CDC
#define CONFIG_NETCONSOLE
#endif

View file

@ -178,10 +178,6 @@
#define CONFIG_AM335X_USB1
#define CONFIG_AM335X_USB1_MODE MUSB_HOST
#ifdef CONFIG_USB_MUSB_GADGET
#define CONFIG_USB_ETH_RNDIS
#endif /* CONFIG_USB_MUSB_GADGET */
/* USB DRACO ID as default */
#define CONFIG_USBD_HS

View file

@ -67,7 +67,6 @@
#endif
/* USB device */
#define CONFIG_USB_ETH_RNDIS
#define CONFIG_USBNET_MANUFACTURER "L+G VInCo"
/* Ethernet Hardware */

View file

@ -136,8 +136,6 @@
#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_16M
#define DFU_DEFAULT_POLL_TIMEOUT 300
#define CONFIG_USB_ETH_CDC
#define CONFIG_USB_ETH_RNDIS
#define CONFIG_USBNET_DEV_ADDR "de:ad:be:af:00:01"
#endif

View file

@ -39,7 +39,6 @@
#define CONFIG_EHCI_MXS_PORT0
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
#define CONFIG_USB_ETH_CDC
#define CONFIG_NETCONSOLE
#endif

View file

@ -5003,9 +5003,7 @@ CONFIG_USB_EHCI_TEGRA
CONFIG_USB_EHCI_TXFIFO_THRESH
CONFIG_USB_EHCI_VCT
CONFIG_USB_EHCI_VF
CONFIG_USB_ETH_CDC
CONFIG_USB_ETH_QMULT
CONFIG_USB_ETH_RNDIS
CONFIG_USB_ETH_SUBSET
CONFIG_USB_EXT2_BOOT
CONFIG_USB_FAT_BOOT