Commit 76b09b85 authored by Bin Liu's avatar Bin Liu Committed by Tom Rini
Browse files

musb: set MUSB speed based on CONFIG



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: default avatarTom Rini <trini@ti.com>
Signed-off-by: default avatarBin Liu <b-liu@ti.com>
parent 4de602f2
......@@ -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 */
);
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment