]> git.sur5r.net Git - u-boot/commitdiff
usb: gadget: usb_ether: Move settings to common
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Thu, 7 Sep 2017 07:15:08 +0000 (09:15 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 3 Oct 2017 17:12:05 +0000 (19:12 +0200)
The usb_ether gadget duplicates the USB settings for the manufacturer,
product ID and vendor ID.

Make sure we use the common option so that we can expect a single VID/PID
couple for a single device.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
configs/sama5d2_ptc_nandflash_defconfig
configs/sama5d2_ptc_spiflash_defconfig
configs/vinco_defconfig
drivers/usb/gadget/ether.c
include/configs/ma5d4evk.h
include/configs/sama5d2_ptc.h
include/configs/vinco.h
scripts/config_whitelist.txt

index d30ca385298e23f2b2562768e97399eb1b79289a..06b6ec798ea50defe9c8f69185a2cdee8e2a70b9 100644 (file)
@@ -29,5 +29,6 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="Atmel SAMA5D2_PTC"
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_USB_ETHER=y
index 3cb9b36f11fed85190ca4d69e21601e0a7bf8b92..65744480505a4193f4718dd359f6774f98c5bd44 100644 (file)
@@ -30,5 +30,6 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="Atmel SAMA5D2_PTC"
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_USB_ETHER=y
index 76dd07fb93a479457f0a8f72146c1145301a89f0..704c36a88a0ea881486ed6672ca0d19d56000898 100644 (file)
@@ -31,6 +31,7 @@ CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_MANUFACTURER="L+G VInCo"
 CONFIG_USB_GADGET_ATMEL_USBA=y
 CONFIG_USB_ETHER=y
 CONFIG_USB_HOST_ETHER=y
index 2cf5c8d31e25acb1c8a557d8e38e2ec7e84fa1ad..dbb578258f96ed202121b8cbb282efe99e034bdf 100644 (file)
@@ -273,8 +273,8 @@ static inline int BITRATE(struct usb_gadget *g)
  * static ushort idProduct;
  */
 
-#if defined(CONFIG_USBNET_MANUFACTURER)
-static char *iManufacturer = CONFIG_USBNET_MANUFACTURER;
+#if defined(CONFIG_USB_GADGET_MANUFACTURER)
+static char *iManufacturer = CONFIG_USB_GADGET_MANUFACTURER;
 #else
 static char *iManufacturer = "U-Boot";
 #endif
@@ -2073,11 +2073,11 @@ static int eth_bind(struct usb_gadget *gadget)
         * to choose the right configuration otherwise.
         */
        if (rndis) {
-#if defined(CONFIG_USB_RNDIS_VENDOR_ID) && defined(CONFIG_USB_RNDIS_PRODUCT_ID)
+#if defined(CONFIG_USB_GADGET_VENDOR_NUM) && defined(CONFIG_USB_GADGET_PRODUCT_NUM)
                device_desc.idVendor =
-                       __constant_cpu_to_le16(CONFIG_USB_RNDIS_VENDOR_ID);
+                       __constant_cpu_to_le16(CONFIG_USB_GADGET_VENDOR_NUM);
                device_desc.idProduct =
-                       __constant_cpu_to_le16(CONFIG_USB_RNDIS_PRODUCT_ID);
+                       __constant_cpu_to_le16(CONFIG_USB_GADGET_PRODUCT_NUM);
 #else
                device_desc.idVendor =
                        __constant_cpu_to_le16(RNDIS_VENDOR_NUM);
@@ -2092,9 +2092,9 @@ static int eth_bind(struct usb_gadget *gadget)
         * supporting one submode of the "SAFE" variant of MDLM.)
         */
        } else {
-#if defined(CONFIG_USB_CDC_VENDOR_ID) && defined(CONFIG_USB_CDC_PRODUCT_ID)
-               device_desc.idVendor = cpu_to_le16(CONFIG_USB_CDC_VENDOR_ID);
-               device_desc.idProduct = cpu_to_le16(CONFIG_USB_CDC_PRODUCT_ID);
+#if defined(CONFIG_USB_GADGET_VENDOR_NUM) && defined(CONFIG_USB_GADGET_PRODUCT_NUM)
+               device_desc.idVendor = cpu_to_le16(CONFIG_USB_GADGET_VENDOR_NUM);
+               device_desc.idProduct = cpu_to_le16(CONFIG_USB_GADGET_PRODUCT_NUM);
 #else
                if (!cdc) {
                        device_desc.idVendor =
index ad3abf911626b7353ae37d04bd54ce77eb4a04b2..5ecc97fbe778849dc127ff6dc667ce7664f2da37 100644 (file)
 #ifdef CONFIG_CMD_USB
 
 /* USB device */
-#define CONFIG_USBNET_MANUFACTURER      "AriesEmbedded"
 #define CONFIG_USB_FUNCTION_MASS_STORAGE
 #define CONFIG_SYS_DFU_DATA_BUF_SIZE   (1 * 1024 * 1024)
 #define DFU_DEFAULT_POLL_TIMEOUT       300
index ff129016c4d3806025975a467ff68c98e7887416..c52dcd4e8fd21613cd8354f37e83253df550be4e 100644 (file)
@@ -62,7 +62,6 @@
 #endif
 
 /* USB device */
-#define CONFIG_USBNET_MANUFACTURER      "Atmel SAMA5D2_PTC"
 
 /* Ethernet Hardware */
 #define CONFIG_MACB
index de6fa9b7c584e1af6ca53f4a591f053146853c5d..b2225ab88052b2a1ee5eaae5b89bdef380c39126 100644 (file)
@@ -67,7 +67,6 @@
 #endif
 
 /* USB device */
-#define CONFIG_USBNET_MANUFACTURER      "L+G VInCo"
 
 /* Ethernet Hardware */
 #define CONFIG_PHY_SMSC
index 80927d614b66d54fafdf75966bcb123f7b5ba37c..4ddb2ca97fa4512a05314ed7df5e63d9585686b9 100644 (file)
@@ -4973,7 +4973,6 @@ CONFIG_USBD_SERIAL_OUT_PKTSIZE
 CONFIG_USBD_VENDORID
 CONFIG_USBID_ADDR
 CONFIG_USBNET_DEV_ADDR
-CONFIG_USBNET_MANUFACTURER
 CONFIG_USBTTY
 CONFIG_USB_AM35X
 CONFIG_USB_ATMEL