public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bin Liu <b-liu@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] musb: set MUSB speed based on CONFIG
Date: Thu, 21 Mar 2013 10:27:49 -0500	[thread overview]
Message-ID: <1363879669-30747-2-git-send-email-b-liu@ti.com> (raw)
In-Reply-To: <1363879669-30747-1-git-send-email-b-liu@ti.com>

Do not config MUSB to highspeed mode if CONFIG_USB_GADGET_DUALSPEED
is not set, in which case Ether gadget only operates in fullspeed.

Reviewed-by: Tom Rini <trini@ti.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
---
 drivers/usb/musb-new/musb_core.c  |    2 ++
 drivers/usb/musb-new/musb_uboot.c |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/musb-new/musb_core.c b/drivers/usb/musb-new/musb_core.c
index aa647e6..da93571 100644
--- a/drivers/usb/musb-new/musb_core.c
+++ b/drivers/usb/musb-new/musb_core.c
@@ -943,7 +943,9 @@ void musb_start(struct musb *musb)
 
 	/* put into basic highspeed mode and start session */
 	musb_writeb(regs, MUSB_POWER, MUSB_POWER_ISOUPDATE
+#ifdef CONFIG_USB_GADGET_DUALSPEED
 						| MUSB_POWER_HSENAB
+#endif
 						/* ENSUSPEND wedges tusb */
 						/* | MUSB_POWER_ENSUSPEND */
 						);
diff --git a/drivers/usb/musb-new/musb_uboot.c b/drivers/usb/musb-new/musb_uboot.c
index 096c4f4..ee3e6c5 100644
--- a/drivers/usb/musb-new/musb_uboot.c
+++ b/drivers/usb/musb-new/musb_uboot.c
@@ -174,7 +174,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver)
 {
 	int ret;
 
-	if (!driver || driver->speed < USB_SPEED_HIGH || !driver->bind ||
+	if (!driver || driver->speed < USB_SPEED_FULL || !driver->bind ||
 	    !driver->setup) {
 		printf("bad parameter.\n");
 		return -EINVAL;
-- 
1.7.9.5

  reply	other threads:[~2013-03-21 15:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-21 15:27 [U-Boot] [PATCH] musb: am335x: disable bulk split-combine feature Bin Liu
2013-03-21 15:27 ` Bin Liu [this message]
2013-04-08 16:56   ` [U-Boot] musb: set MUSB speed based on CONFIG Tom Rini
2013-04-08 16:56 ` [U-Boot] musb: am335x: disable bulk split-combine feature Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2015-07-10 13:16 [U-Boot] (no subject) Samuel Egli
2015-07-10 13:16 ` [U-Boot] [PATCH] musb: set MUSB speed based on CONFIG Samuel Egli
2015-07-10 14:30   ` Hans de Goede
2015-07-10 14:36     ` Hans de Goede
2015-07-10 14:50       ` Egli, Samuel
2015-07-10 15:12         ` Heiko Schocher
2015-07-10 15:31           ` Bin Liu
2015-07-11 13:01             ` Hans de Goede
2015-07-11 13:04             ` Hans de Goede
2015-07-13 14:16               ` Bin Liu
2015-07-19 11:01                 ` Hans de Goede
2015-07-21 17:04                   ` Bin Liu
2015-07-13  4:24             ` Heiko Schocher

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=1363879669-30747-2-git-send-email-b-liu@ti.com \
    --to=b-liu@ti.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