public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED
Date: Sun, 28 Sep 2014 18:35:14 -0700	[thread overview]
Message-ID: <1411954514-18549-1-git-send-email-eric.nelson@boundarydevices.com> (raw)
In-Reply-To: <20140929012119.GA21079@saruman>

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>
---
 V2 uses PFSC constant, setbits_le32, and expands commit message
 V3 removes restriction on i.MX6 and extraneous declaration

 drivers/usb/gadget/ci_udc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index 2572b34..b0ef35e 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -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 */
-- 
1.9.1

  parent reply	other threads:[~2014-09-29  1:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-28 19:12 [U-Boot] [PATCH] ci_udc: force full-speed operation if !CONFIG_USB_GADGET_DUALSPEED Eric Nelson
2014-09-28 20:28 ` Marek Vasut
2014-09-28 22:01   ` Eric Nelson
2014-09-29  0:36 ` [U-Boot] [PATCH V2] usb: ci_udc: respect CONFIG_USB_GADGET_DUALSPEED Eric Nelson
2014-09-29  1:21   ` Felipe Balbi
2014-09-29  1:30     ` Eric Nelson
2014-09-29  1:35     ` Eric Nelson [this message]
2014-09-29 14:01       ` [U-Boot] [PATCH] " Felipe Balbi
2014-09-29 14:43         ` Marek Vasut
2014-09-29 17:04           ` Eric Nelson
2014-09-29 22:59       ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1411954514-18549-1-git-send-email-eric.nelson@boundarydevices.com \
    --to=eric.nelson@boundarydevices.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox