提交 76b09b85 编写于 作者: B Bin Liu 提交者: Tom Rini

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: NTom Rini <trini@ti.com>
Signed-off-by: NBin Liu <b-liu@ti.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册