]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/host/ehci-fsl.c
arm: mx6: usb: kconfig: add USB_EHCI_MX6 kconfig option
[u-boot] / drivers / usb / host / ehci-fsl.c
index 2dca5244be9c15b87116b9e880c06e69d7c41927..97b7f14542591cf22e4e576ddbc21512f1e49fa9 100644 (file)
@@ -76,7 +76,7 @@ int ehci_hcd_init(int index, enum usb_init_type init,
                break;
        default:
                printf("ERROR: wrong controller index!!\n");
-               break;
+               return -EINVAL;
        };
 
        *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength);
@@ -138,6 +138,16 @@ int ehci_hcd_init(int index, enum usb_init_type init,
        if (has_erratum_a007798())
                set_txfifothresh(ehci, TXFIFOTHRESH);
 
+       if (has_erratum_a004477()) {
+               /*
+                * When reset is issued while any ULPI transaction is ongoing
+                * then it may result to corruption of ULPI Function Control
+                * Register which eventually causes phy clock to enter low
+                * power mode which stops the clock. Thus delay is required
+                * before reset to let ongoing ULPI transaction complete.
+                */
+               udelay(1);
+       }
        return 0;
 }