UPSTREAM: usb: gadget: usb_ether: Move settings to common
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. Change-Id: I71cabacc3dcf5a7335996b2ddaf812e1c97b097b Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Frank Wang <frank.wang@rock-chips.com> (cherry picked from commit 10ac57fda3ff46a20af7ded6cc03d78e88032495)
This commit is contained in:
parent
473221da5a
commit
b466df35fb
|
|
@ -29,5 +29,6 @@ CONFIG_USB=y
|
||||||
CONFIG_USB_EHCI_HCD=y
|
CONFIG_USB_EHCI_HCD=y
|
||||||
CONFIG_USB_STORAGE=y
|
CONFIG_USB_STORAGE=y
|
||||||
CONFIG_USB_GADGET=y
|
CONFIG_USB_GADGET=y
|
||||||
|
CONFIG_USB_GADGET_MANUFACTURER="Atmel SAMA5D2_PTC"
|
||||||
CONFIG_USB_GADGET_ATMEL_USBA=y
|
CONFIG_USB_GADGET_ATMEL_USBA=y
|
||||||
CONFIG_USB_ETHER=y
|
CONFIG_USB_ETHER=y
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,6 @@ CONFIG_USB=y
|
||||||
CONFIG_USB_EHCI_HCD=y
|
CONFIG_USB_EHCI_HCD=y
|
||||||
CONFIG_USB_STORAGE=y
|
CONFIG_USB_STORAGE=y
|
||||||
CONFIG_USB_GADGET=y
|
CONFIG_USB_GADGET=y
|
||||||
|
CONFIG_USB_GADGET_MANUFACTURER="Atmel SAMA5D2_PTC"
|
||||||
CONFIG_USB_GADGET_ATMEL_USBA=y
|
CONFIG_USB_GADGET_ATMEL_USBA=y
|
||||||
CONFIG_USB_ETHER=y
|
CONFIG_USB_ETHER=y
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ CONFIG_USB=y
|
||||||
CONFIG_USB_EHCI_HCD=y
|
CONFIG_USB_EHCI_HCD=y
|
||||||
CONFIG_USB_STORAGE=y
|
CONFIG_USB_STORAGE=y
|
||||||
CONFIG_USB_GADGET=y
|
CONFIG_USB_GADGET=y
|
||||||
|
CONFIG_USB_GADGET_MANUFACTURER="L+G VInCo"
|
||||||
CONFIG_USB_GADGET_ATMEL_USBA=y
|
CONFIG_USB_GADGET_ATMEL_USBA=y
|
||||||
CONFIG_USB_ETHER=y
|
CONFIG_USB_ETHER=y
|
||||||
CONFIG_USB_HOST_ETHER=y
|
CONFIG_USB_HOST_ETHER=y
|
||||||
|
|
|
||||||
|
|
@ -273,8 +273,8 @@ static inline int BITRATE(struct usb_gadget *g)
|
||||||
* static ushort idProduct;
|
* static ushort idProduct;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_USBNET_MANUFACTURER)
|
#if defined(CONFIG_USB_GADGET_MANUFACTURER)
|
||||||
static char *iManufacturer = CONFIG_USBNET_MANUFACTURER;
|
static char *iManufacturer = CONFIG_USB_GADGET_MANUFACTURER;
|
||||||
#else
|
#else
|
||||||
static char *iManufacturer = "U-Boot";
|
static char *iManufacturer = "U-Boot";
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -2073,11 +2073,11 @@ static int eth_bind(struct usb_gadget *gadget)
|
||||||
* to choose the right configuration otherwise.
|
* to choose the right configuration otherwise.
|
||||||
*/
|
*/
|
||||||
if (rndis) {
|
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 =
|
device_desc.idVendor =
|
||||||
__constant_cpu_to_le16(CONFIG_USB_RNDIS_VENDOR_ID);
|
__constant_cpu_to_le16(CONFIG_USB_GADGET_VENDOR_NUM);
|
||||||
device_desc.idProduct =
|
device_desc.idProduct =
|
||||||
__constant_cpu_to_le16(CONFIG_USB_RNDIS_PRODUCT_ID);
|
__constant_cpu_to_le16(CONFIG_USB_GADGET_PRODUCT_NUM);
|
||||||
#else
|
#else
|
||||||
device_desc.idVendor =
|
device_desc.idVendor =
|
||||||
__constant_cpu_to_le16(RNDIS_VENDOR_NUM);
|
__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.)
|
* supporting one submode of the "SAFE" variant of MDLM.)
|
||||||
*/
|
*/
|
||||||
} else {
|
} else {
|
||||||
#if defined(CONFIG_USB_CDC_VENDOR_ID) && defined(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_CDC_VENDOR_ID);
|
device_desc.idVendor = cpu_to_le16(CONFIG_USB_GADGET_VENDOR_NUM);
|
||||||
device_desc.idProduct = cpu_to_le16(CONFIG_USB_CDC_PRODUCT_ID);
|
device_desc.idProduct = cpu_to_le16(CONFIG_USB_GADGET_PRODUCT_NUM);
|
||||||
#else
|
#else
|
||||||
if (!cdc) {
|
if (!cdc) {
|
||||||
device_desc.idVendor =
|
device_desc.idVendor =
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,6 @@
|
||||||
#ifdef CONFIG_CMD_USB
|
#ifdef CONFIG_CMD_USB
|
||||||
|
|
||||||
/* USB device */
|
/* USB device */
|
||||||
#define CONFIG_USBNET_MANUFACTURER "AriesEmbedded"
|
|
||||||
#define CONFIG_USB_FUNCTION_MASS_STORAGE
|
#define CONFIG_USB_FUNCTION_MASS_STORAGE
|
||||||
#define CONFIG_SYS_DFU_DATA_BUF_SIZE (1 * 1024 * 1024)
|
#define CONFIG_SYS_DFU_DATA_BUF_SIZE (1 * 1024 * 1024)
|
||||||
#define DFU_DEFAULT_POLL_TIMEOUT 300
|
#define DFU_DEFAULT_POLL_TIMEOUT 300
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* USB device */
|
/* USB device */
|
||||||
#define CONFIG_USBNET_MANUFACTURER "Atmel SAMA5D2_PTC"
|
|
||||||
|
|
||||||
/* Ethernet Hardware */
|
/* Ethernet Hardware */
|
||||||
#define CONFIG_MACB
|
#define CONFIG_MACB
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* USB device */
|
/* USB device */
|
||||||
#define CONFIG_USBNET_MANUFACTURER "L+G VInCo"
|
|
||||||
|
|
||||||
/* Ethernet Hardware */
|
/* Ethernet Hardware */
|
||||||
#define CONFIG_PHY_SMSC
|
#define CONFIG_PHY_SMSC
|
||||||
|
|
|
||||||
|
|
@ -4941,7 +4941,6 @@ CONFIG_USBD_SERIAL_OUT_PKTSIZE
|
||||||
CONFIG_USBD_VENDORID
|
CONFIG_USBD_VENDORID
|
||||||
CONFIG_USBID_ADDR
|
CONFIG_USBID_ADDR
|
||||||
CONFIG_USBNET_DEV_ADDR
|
CONFIG_USBNET_DEV_ADDR
|
||||||
CONFIG_USBNET_MANUFACTURER
|
|
||||||
CONFIG_USBTTY
|
CONFIG_USBTTY
|
||||||
CONFIG_USB_AM35X
|
CONFIG_USB_AM35X
|
||||||
CONFIG_USB_ATMEL
|
CONFIG_USB_ATMEL
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue