From: Eric Nelson Date: Sun, 28 Sep 2014 17:36:56 -0700 Subject: [U-Boot] [PATCH V2] usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED In-Reply-To: <1411931555-15826-1-git-send-email-eric.nelson@boundarydevices.com> References: <1411931555-15826-1-git-send-email-eric.nelson@boundarydevices.com> Message-ID: <1411951016-16330-1-git-send-email-eric.nelson@boundarydevices.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- drivers/usb/gadget/ci_udc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c index 2572b34..dbbeff7 100644 --- a/drivers/usb/gadget/ci_udc.c +++ b/drivers/usb/gadget/ci_udc.c @@ -766,6 +766,7 @@ void udc_disconnect(void) static int ci_pullup(struct usb_gadget *gadget, int is_on) { + u32 regval; struct ci_udc *udc = (struct ci_udc *)controller.ctrl->hcor; if (is_on) { /* RESET */ @@ -777,6 +778,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) && defined(CONFIG_MX6) + /* 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 */ -- 1.9.1