mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
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: Tom Rini <trini@ti.com> Signed-off-by: Bin Liu <b-liu@ti.com>
This commit is contained in:
parent
4de602f2b0
commit
76b09b8561
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue