]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
musb: set MUSB speed based on CONFIG
authorBin Liu <b-liu@ti.com>
Thu, 21 Mar 2013 05:27:49 +0000 (05:27 +0000)
committerTom Rini <trini@ti.com>
Mon, 8 Apr 2013 15:29:04 +0000 (11:29 -0400)
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
drivers/usb/musb-new/musb_uboot.c

index aa647e6a3073e04fc01c01e3ff2586ae9b8928d9..da9357149bc6c9bb8a56fb5aba2d8de6f50de236 100644 (file)
@@ -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 */
                                                );
index 762cbc11df10b3fc1c3cad722dbf958b96a836f1..15d2ec007816faa609ebf4ee806db45627ad4033 100644 (file)
@@ -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;