[U-Boot] [PATCH v2 05/14] usb: gadget: usb_ether: Move the interfaces to Kconfig
Łukasz Majewski
lukma at denx.de
Wed Sep 13 10:39:50 UTC 2017
On 09/12/2017 09:01 PM, Maxime Ripard wrote:
> 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 at denx.de>
>
> Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> ---
> configs/gwventana_emmc_defconfig | 1 +-
> configs/gwventana_gw5904_defconfig | 1 +-
> configs/gwventana_nand_defconfig | 1 +-
> configs/mx6qsabrelite_defconfig | 1 +-
> configs/nitrogen6dl2g_defconfig | 1 +-
> configs/nitrogen6dl_defconfig | 1 +-
> configs/nitrogen6q2g_defconfig | 1 +-
> configs/nitrogen6q_defconfig | 1 +-
> configs/nitrogen6s1g_defconfig | 1 +-
> configs/nitrogen6s_defconfig | 1 +-
> configs/novena_defconfig | 1 +-
> configs/sansa_fuze_plus_defconfig | 1 +-
> configs/warp7_defconfig | 1 +-
> configs/warp7_secure_defconfig | 1 +-
> configs/xfi3_defconfig | 1 +-
> drivers/usb/gadget/Kconfig | 28 +++++++++++++++++++++++++++-
> include/configs/am335x_evm.h | 4 +----
> include/configs/am3517_evm.h | 4 +----
> include/configs/baltos.h | 4 +----
> include/configs/gw_ventana.h | 1 +-
> include/configs/ma5d4evk.h | 1 +-
> include/configs/nitrogen6x.h | 1 +-
> include/configs/novena.h | 1 +-
> include/configs/pcm051.h | 4 +----
> include/configs/sama5d2_ptc.h | 1 +-
> include/configs/sansa_fuze_plus.h | 1 +-
> include/configs/siemens-am33x-common.h | 4 +----
> include/configs/vinco.h | 1 +-
> include/configs/warp7.h | 2 +--
> include/configs/xfi3.h | 1 +-
> scripts/config_whitelist.txt | 2 +--
> 31 files changed, 43 insertions(+), 32 deletions(-)
>
> diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
> index 35d9e1ac27dc..03d732d8f11e 100644
> --- a/configs/gwventana_emmc_defconfig
> +++ b/configs/gwventana_emmc_defconfig
> @@ -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
> diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
> index ca7eb5ac573e..51aa13dbaca3 100644
> --- a/configs/gwventana_gw5904_defconfig
> +++ b/configs/gwventana_gw5904_defconfig
> @@ -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
> diff --git a/configs/gwventana_nand_defconfig b/configs/gwventana_nand_defconfig
> index cb9655574888..4b2e1a752935 100644
> --- a/configs/gwventana_nand_defconfig
> +++ b/configs/gwventana_nand_defconfig
> @@ -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
> diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig
> index bab0d0c79f0d..f716c8fd7f77 100644
> --- a/configs/mx6qsabrelite_defconfig
> +++ b/configs/mx6qsabrelite_defconfig
> @@ -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
> diff --git a/configs/nitrogen6dl2g_defconfig b/configs/nitrogen6dl2g_defconfig
> index 0d19b85a30f3..fd4a46558129 100644
> --- a/configs/nitrogen6dl2g_defconfig
> +++ b/configs/nitrogen6dl2g_defconfig
> @@ -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
> diff --git a/configs/nitrogen6dl_defconfig b/configs/nitrogen6dl_defconfig
> index a20580eb77bb..30046e3f3a07 100644
> --- a/configs/nitrogen6dl_defconfig
> +++ b/configs/nitrogen6dl_defconfig
> @@ -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
> diff --git a/configs/nitrogen6q2g_defconfig b/configs/nitrogen6q2g_defconfig
> index 940c74a5ece2..f9160c208fe7 100644
> --- a/configs/nitrogen6q2g_defconfig
> +++ b/configs/nitrogen6q2g_defconfig
> @@ -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
> diff --git a/configs/nitrogen6q_defconfig b/configs/nitrogen6q_defconfig
> index 83772cb2efcf..8bca0e04439e 100644
> --- a/configs/nitrogen6q_defconfig
> +++ b/configs/nitrogen6q_defconfig
> @@ -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
> diff --git a/configs/nitrogen6s1g_defconfig b/configs/nitrogen6s1g_defconfig
> index 862b41a3f8c9..668fbaa37010 100644
> --- a/configs/nitrogen6s1g_defconfig
> +++ b/configs/nitrogen6s1g_defconfig
> @@ -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
> diff --git a/configs/nitrogen6s_defconfig b/configs/nitrogen6s_defconfig
> index e5376313b9bd..99106c9a1f5a 100644
> --- a/configs/nitrogen6s_defconfig
> +++ b/configs/nitrogen6s_defconfig
> @@ -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
> diff --git a/configs/novena_defconfig b/configs/novena_defconfig
> index 786ab2854f70..a7056ff13771 100644
> --- a/configs/novena_defconfig
> +++ b/configs/novena_defconfig
> @@ -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
> diff --git a/configs/sansa_fuze_plus_defconfig b/configs/sansa_fuze_plus_defconfig
> index c6d50ccb8e15..b5443dda98a9 100644
> --- a/configs/sansa_fuze_plus_defconfig
> +++ b/configs/sansa_fuze_plus_defconfig
> @@ -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
> diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
> index 8a3717facdbd..32cf7a4da4b4 100644
> --- a/configs/warp7_defconfig
> +++ b/configs/warp7_defconfig
> @@ -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
> diff --git a/configs/warp7_secure_defconfig b/configs/warp7_secure_defconfig
> index 83a06079fdc5..99764dbd0bb1 100644
> --- a/configs/warp7_secure_defconfig
> +++ b/configs/warp7_secure_defconfig
> @@ -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
> diff --git a/configs/xfi3_defconfig b/configs/xfi3_defconfig
> index 6cc78452829c..91768a4a7106 100644
> --- a/configs/xfi3_defconfig
> +++ b/configs/xfi3_defconfig
> @@ -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
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index ae3a37b3a935..1201276be837 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -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"
> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
> index 9238c4bb769c..96294679bf9b 100644
> --- a/include/configs/am335x_evm.h
> +++ b/include/configs/am335x_evm.h
> @@ -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
> diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
> index d09672770134..38bd6e35e8cd 100644
> --- a/include/configs/am3517_evm.h
> +++ b/include/configs/am3517_evm.h
> @@ -79,10 +79,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 */
> diff --git a/include/configs/baltos.h b/include/configs/baltos.h
> index 380a78918f29..44af4d3deec8 100644
> --- a/include/configs/baltos.h
> +++ b/include/configs/baltos.h
> @@ -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 */
> diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
> index f4b7a061ba12..2795568e8c89 100644
> --- a/include/configs/gw_ventana.h
> +++ b/include/configs/gw_ventana.h
> @@ -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 */
> diff --git a/include/configs/ma5d4evk.h b/include/configs/ma5d4evk.h
> index 2ad4952f5eeb..6d25d84c6eb6 100644
> --- a/include/configs/ma5d4evk.h
> +++ b/include/configs/ma5d4evk.h
> @@ -97,7 +97,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)
> diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
> index ca37f584f042..6068b70d2d69 100644
> --- a/include/configs/nitrogen6x.h
> +++ b/include/configs/nitrogen6x.h
> @@ -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
> diff --git a/include/configs/novena.h b/include/configs/novena.h
> index 9068ee2182e3..4825d5bac19a 100644
> --- a/include/configs/novena.h
> +++ b/include/configs/novena.h
> @@ -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
>
> diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
> index 309bbd6bd36f..79f3f48df87e 100644
> --- a/include/configs/pcm051.h
> +++ b/include/configs/pcm051.h
> @@ -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 */
> diff --git a/include/configs/sama5d2_ptc.h b/include/configs/sama5d2_ptc.h
> index a1a0602cdd0c..543592e3a574 100644
> --- a/include/configs/sama5d2_ptc.h
> +++ b/include/configs/sama5d2_ptc.h
> @@ -60,7 +60,6 @@
> #endif
>
> /* USB device */
> -#define CONFIG_USB_ETH_RNDIS
> #define CONFIG_USBNET_MANUFACTURER "Atmel SAMA5D2_PTC"
>
> /* Ethernet Hardware */
> diff --git a/include/configs/sansa_fuze_plus.h b/include/configs/sansa_fuze_plus.h
> index 9e33ca42270c..99200140fe5e 100644
> --- a/include/configs/sansa_fuze_plus.h
> +++ b/include/configs/sansa_fuze_plus.h
> @@ -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
>
> diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
> index 0600984f95aa..1997c2dd5ae4 100644
> --- a/include/configs/siemens-am33x-common.h
> +++ b/include/configs/siemens-am33x-common.h
> @@ -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
>
> diff --git a/include/configs/vinco.h b/include/configs/vinco.h
> index 3b3ec6c8f2ad..f5aaaa2ffe91 100644
> --- a/include/configs/vinco.h
> +++ b/include/configs/vinco.h
> @@ -64,7 +64,6 @@
> #endif
>
> /* USB device */
> -#define CONFIG_USB_ETH_RNDIS
> #define CONFIG_USBNET_MANUFACTURER "L+G VInCo"
>
> /* Ethernet Hardware */
> diff --git a/include/configs/warp7.h b/include/configs/warp7.h
> index 05ae3542a9ad..11f1bc3eab75 100644
> --- a/include/configs/warp7.h
> +++ b/include/configs/warp7.h
> @@ -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
> diff --git a/include/configs/xfi3.h b/include/configs/xfi3.h
> index 7bbfd75c0cb8..1e70a762e0d9 100644
> --- a/include/configs/xfi3.h
> +++ b/include/configs/xfi3.h
> @@ -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
>
> diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
> index e9e716e7c80e..bbc3d4351bbd 100644
> --- a/scripts/config_whitelist.txt
> +++ b/scripts/config_whitelist.txt
> @@ -5013,9 +5013,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
>
--
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
More information about the U-Boot
mailing list