tizen: bootmode: enable uart console with home key
[profile/mobile/platform/kernel/u-boot-tm1.git] / common / usb.c
index 10e23de..5919e2d 100644 (file)
@@ -83,16 +83,6 @@ void usb_hub_reset(void);
 static int hub_port_reset(struct usb_device *dev, int port,
                          unsigned short *portstat);
 
-/***********************************************************************
- * wait_ms
- */
-
-inline void wait_ms(unsigned long ms)
-{
-       while (ms-- > 0)
-               udelay(1000);
-}
-
 /***************************************************************************
  * Init USB Device
  */
@@ -205,7 +195,7 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe,
        while (timeout--) {
                if (!((volatile unsigned long)dev->status & USB_ST_NOT_PROC))
                        break;
-               wait_ms(1);
+               mdelay(1);
        }
        if (dev->status)
                return -1;
@@ -229,7 +219,7 @@ int usb_bulk_msg(struct usb_device *dev, unsigned int pipe,
        while (timeout--) {
                if (!((volatile unsigned long)dev->status & USB_ST_NOT_PROC))
                        break;
-               wait_ms(1);
+               mdelay(1);
        }
        *actual_length = dev->act_len;
        if (dev->status == 0)
@@ -876,7 +866,7 @@ int usb_new_device(struct usb_device *dev)
                return 1;
        }
 
-       wait_ms(10);    /* Let the SET_ADDRESS settle */
+       mdelay(10);     /* Let the SET_ADDRESS settle */
 
        tmp = sizeof(dev->descriptor);
 
@@ -1027,7 +1017,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
        for (i = 0; i < dev->maxchild; i++) {
                usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
                USB_HUB_PRINTF("port %d returns %lX\n", i + 1, dev->status);
-               wait_ms(hub->desc.bPwrOn2PwrGood * 2);
+               mdelay(hub->desc.bPwrOn2PwrGood * 2);
        }
 }
 
@@ -1068,7 +1058,7 @@ static int hub_port_reset(struct usb_device *dev, int port,
        for (tries = 0; tries < MAX_TRIES; tries++) {
 
                usb_set_port_feature(dev, port + 1, USB_PORT_FEAT_RESET);
-               wait_ms(200);
+               mdelay(200);
 
                if (usb_get_port_status(dev, port + 1, &portsts) < 0) {
                        USB_HUB_PRINTF("get_port_status failed status %lX\n",
@@ -1095,7 +1085,7 @@ static int hub_port_reset(struct usb_device *dev, int port,
                if (portstatus & USB_PORT_STAT_ENABLE)
                        break;
 
-               wait_ms(200);
+               mdelay(200);
        }
 
        if (tries == MAX_TRIES) {
@@ -1139,7 +1129,7 @@ void usb_hub_port_connect_change(struct usb_device *dev, int port)
                if (!(portstatus & USB_PORT_STAT_CONNECTION))
                        return;
        }
-       wait_ms(200);
+       mdelay(200);
 
        /* Reset the port */
        if (hub_port_reset(dev, port, &portstatus) < 0) {
@@ -1147,7 +1137,7 @@ void usb_hub_port_connect_change(struct usb_device *dev, int port)
                return;
        }
 
-       wait_ms(200);
+       mdelay(200);
 
        /* Allocate a new device struct for it */
        usb = usb_alloc_new_device();