]> git.sur5r.net Git - u-boot/commitdiff
usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED
authorEric Nelson <eric.nelson@boundarydevices.com>
Mon, 29 Sep 2014 01:35:14 +0000 (18:35 -0700)
committerMarek Vasut <marex@denx.de>
Mon, 6 Oct 2014 12:50:44 +0000 (14:50 +0200)
Force full-speed (12 Mbit/s) operation if CONFIG_USB_GADGET_DUALSPEED
is not defined.

The controller is capable of high-speed (480 Mbit/s) operation,
but some designs may require the use of lower-speed operation.

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
drivers/usb/gadget/ci_udc.c

index 2572b346ebfa39c8204aa45912e119ea17104dfd..b0ef35e745a3fd41dff77a6e27cb18f1bf62ce52 100644 (file)
@@ -777,6 +777,11 @@ static int ci_pullup(struct usb_gadget *gadget, int is_on)
                /* select DEVICE mode */
                writel(USBMODE_DEVICE, &udc->usbmode);
 
+#if !defined(CONFIG_USB_GADGET_DUALSPEED)
+               /* Port force Full-Speed Connect */
+               setbits_le32(&udc->portsc, PFSC);
+#endif
+
                writel(0xffffffff, &udc->epflush);
 
                /* Turn on the USB connection by enabling the pullup resistor */