usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED

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>
This commit is contained in:
Eric Nelson 2014-09-28 18:35:14 -07:00 committed by Marek Vasut
parent 23d1d10c42
commit e206799370

View 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 */