]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/usb_hub.c
mmc: omap_hsmmc: enable 8bit interface for eMMC for AM43xx
[karo-tx-uboot.git] / common / usb_hub.c
index be01f4f257d9a1ec3ae2f9294d39e734ba683cc4..652a104361f63ee715a99e924ccd1145a2c66224 100644 (file)
@@ -489,11 +489,15 @@ static int usb_hub_configure(struct usb_device *dev)
                        portstatus = le16_to_cpu(portsts->wPortStatus);
                        portchange = le16_to_cpu(portsts->wPortChange);
 
-                       if ((portchange & USB_PORT_STAT_C_CONNECTION) ==
-                               (portstatus & USB_PORT_STAT_CONNECTION))
+                       /* No connection change happened, wait a bit more. */
+                       if (!(portchange & USB_PORT_STAT_C_CONNECTION))
+                               continue;
+
+                       /* Test if the connection came up, and if so, exit. */
+                       if (portstatus & USB_PORT_STAT_CONNECTION)
                                break;
 
-               } while (get_timer(start) < CONFIG_SYS_HZ * 10);
+               } while (get_timer(start) < CONFIG_SYS_HZ * 1);
 
                if (ret < 0)
                        continue;
@@ -652,6 +656,6 @@ static const struct usb_device_id hub_id_table[] = {
        { }     /* Terminating entry */
 };
 
-USB_DEVICE(usb_generic_hub, hub_id_table);
+U_BOOT_USB_DEVICE(usb_generic_hub, hub_id_table);
 
 #endif