diff mbox series

[02/13] usb: gadget: Move USBNET_HOST_ADDR to Kconfig

Message ID b667270c23d44150ccb6e395dcdadcb13ed63ed3.1504891631.git-series.maxime.ripard@free-electrons.com
State Superseded
Headers show
Series sunxi: convert musb to the device model and enable usb_ether | expand

Commit Message

Maxime Ripard Sept. 8, 2017, 5:34 p.m. UTC
While the USB Ethernet device address is already defined in Kconfig, the
host address isn't. Convert it.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 configs/am335x_baltos_defconfig        | 1 +
 configs/am335x_boneblack_defconfig     | 1 +
 configs/am335x_evm_norboot_defconfig   | 1 +
 configs/pxm2_defconfig                 | 1 +
 configs/rastaban_defconfig             | 1 +
 configs/warp7_defconfig                | 1 +
 configs/warp7_secure_defconfig         | 1 +
 drivers/usb/gadget/Kconfig             | 4 ++++
 include/configs/am335x_evm.h           | 1 -
 include/configs/baltos.h               | 1 -
 include/configs/h2200.h                | 1 -
 include/configs/siemens-am33x-common.h | 1 -
 include/configs/warp7.h                | 1 -
 scripts/config_whitelist.txt           | 1 -
 14 files changed, 11 insertions(+), 6 deletions(-)

Comments

Simon Glass Sept. 12, 2017, 12:27 p.m. UTC | #1
On 8 September 2017 at 11:34, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> While the USB Ethernet device address is already defined in Kconfig, the
> host address isn't. Convert it.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  configs/am335x_baltos_defconfig        | 1 +
>  configs/am335x_boneblack_defconfig     | 1 +
>  configs/am335x_evm_norboot_defconfig   | 1 +
>  configs/pxm2_defconfig                 | 1 +
>  configs/rastaban_defconfig             | 1 +
>  configs/warp7_defconfig                | 1 +
>  configs/warp7_secure_defconfig         | 1 +
>  drivers/usb/gadget/Kconfig             | 4 ++++
>  include/configs/am335x_evm.h           | 1 -
>  include/configs/baltos.h               | 1 -
>  include/configs/h2200.h                | 1 -
>  include/configs/siemens-am33x-common.h | 1 -
>  include/configs/warp7.h                | 1 -
>  scripts/config_whitelist.txt           | 1 -
>  14 files changed, 11 insertions(+), 6 deletions(-)
>
[..]

> index d52626908846..84c8bf84da5f 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -125,4 +125,8 @@ config USBNET_DEVADDR
>         string "USB Gadget Ethernet device mac address"
>         default "de:ad:be:ef:00:01"
>
> +config USBNET_HOST_ADDR
> +       string "USB Gadget Ethernet host mac address"
> +       default "de:ad:be:ef:00:00"

Please can you add help for this?
diff mbox series

Patch

diff --git a/configs/am335x_baltos_defconfig b/configs/am335x_baltos_defconfig
index eb8338f0f10d..be057acf8634 100644
--- a/configs/am335x_baltos_defconfig
+++ b/configs/am335x_baltos_defconfig
@@ -63,5 +63,6 @@  CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0403
 CONFIG_G_DNL_PRODUCT_NUM=0xbd00
+CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
 CONFIG_FAT_WRITE=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am335x_boneblack_defconfig b/configs/am335x_boneblack_defconfig
index b8526fc15ed3..719d16b145eb 100644
--- a/configs/am335x_boneblack_defconfig
+++ b/configs/am335x_boneblack_defconfig
@@ -42,6 +42,7 @@  CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
+CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
 CONFIG_LZO=y
 CONFIG_OF_LIBFDT=y
 CONFIG_OF_LIBFDT_OVERLAY=y
diff --git a/configs/am335x_evm_norboot_defconfig b/configs/am335x_evm_norboot_defconfig
index c5e7425a7797..c9eab68c8299 100644
--- a/configs/am335x_evm_norboot_defconfig
+++ b/configs/am335x_evm_norboot_defconfig
@@ -35,6 +35,7 @@  CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Texas Instruments"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
+CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
 CONFIG_LZO=y
 CONFIG_OF_LIBFDT=y
 CONFIG_OF_LIBFDT_OVERLAY=y
diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig
index 38370ee8d8f5..b1da71d4c7ed 100644
--- a/configs/pxm2_defconfig
+++ b/configs/pxm2_defconfig
@@ -74,6 +74,7 @@  CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
+CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
 # CONFIG_VIDEO_SW_CURSOR is not set
 CONFIG_SYS_CONSOLE_BG_COL=0xff
 CONFIG_SYS_CONSOLE_FG_COL=0x00
diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig
index 5acfe22b0a6d..940c4144d406 100644
--- a/configs/rastaban_defconfig
+++ b/configs/rastaban_defconfig
@@ -70,3 +70,4 @@  CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Siemens AG"
 CONFIG_G_DNL_VENDOR_NUM=0x0908
 CONFIG_G_DNL_PRODUCT_NUM=0x02d2
+CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 99fe800317c2..f430f30bbbe5 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -38,4 +38,5 @@  CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="FSL"
 CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
+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 8beda72cd882..96e2c9e5cfde 100644
--- a/configs/warp7_secure_defconfig
+++ b/configs/warp7_secure_defconfig
@@ -36,4 +36,5 @@  CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="FSL"
 CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
+CONFIG_USBNET_HOST_ADDR="de:ad:be:af:00:00"
 CONFIG_OF_LIBFDT=y
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index d52626908846..84c8bf84da5f 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -125,4 +125,8 @@  config USBNET_DEVADDR
 	string "USB Gadget Ethernet device mac address"
 	default "de:ad:be:ef:00:01"
 
+config USBNET_HOST_ADDR
+	string "USB Gadget Ethernet host mac address"
+	default "de:ad:be:ef:00:00"
+
 endif # USB_GADGET
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 415ce46e0d8d..7c025c7e46c8 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -266,7 +266,6 @@ 
 #ifdef CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_ETHER
 #define CONFIG_USB_ETH_RNDIS
-#define CONFIG_USBNET_HOST_ADDR	"de:ad:be:af:00:00"
 #endif /* CONFIG_USB_MUSB_GADGET */
 
 /*
diff --git a/include/configs/baltos.h b/include/configs/baltos.h
index 185c749d7868..535fdd4373b0 100644
--- a/include/configs/baltos.h
+++ b/include/configs/baltos.h
@@ -286,7 +286,6 @@ 
 #ifdef CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_ETHER
 #define CONFIG_USB_ETH_RNDIS
-#define CONFIG_USBNET_HOST_ADDR	"de:ad:be:af:00:00"
 #endif /* CONFIG_USB_MUSB_GADGET */
 
 #if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT)
diff --git a/include/configs/h2200.h b/include/configs/h2200.h
index 870014ddf475..e956e89a89d5 100644
--- a/include/configs/h2200.h
+++ b/include/configs/h2200.h
@@ -127,7 +127,6 @@ 
 #define CONFIG_USB_ETH_SUBSET
 
 #define CONFIG_USBNET_DEV_ADDR		"de:ad:be:ef:00:01"
-#define CONFIG_USBNET_HOST_ADDR	"de:ad:be:ef:00:02"
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"stdin=serial\0" \
 	"stdout=serial\0" \
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 2314a2d2ef35..2bcd77e9efc8 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -181,7 +181,6 @@ 
 #ifdef CONFIG_USB_MUSB_GADGET
 #define CONFIG_USB_ETHER
 #define CONFIG_USB_ETH_RNDIS
-#define CONFIG_USBNET_HOST_ADDR	"de:ad:be:af:00:00"
 #endif /* CONFIG_USB_MUSB_GADGET */
 
 /* USB DRACO ID as default */
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 75ae8a3e3338..9ce425156677 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -139,7 +139,6 @@ 
 #define CONFIG_USB_ETHER
 #define CONFIG_USB_ETH_CDC
 #define CONFIG_USB_ETH_RNDIS
-#define CONFIG_USBNET_HOST_ADDR		"de:ad:be:af:00:00"
 #define CONFIG_USBNET_DEV_ADDR		"de:ad:be:af:00:01"
 
 #endif
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index fb2224e38d40..373e65ddde0d 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -4993,7 +4993,6 @@  CONFIG_USBD_SERIAL_OUT_PKTSIZE
 CONFIG_USBD_VENDORID
 CONFIG_USBID_ADDR
 CONFIG_USBNET_DEV_ADDR
-CONFIG_USBNET_HOST_ADDR
 CONFIG_USBNET_MANUFACTURER
 CONFIG_USBTTY
 CONFIG_USB_AM35X