diff --git a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
index 80bb61b27..cf0335c 100644
--- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
+++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c
@@ -1057,7 +1057,7 @@
 	pkt_print(dev, pipe, buffer, transfer_len, cmd, "SUB(rh)",
 		  usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	if (usb_pipeint(pipe)) {
 		info("Root-Hub submit IRQ: NOT implemented");
@@ -1260,7 +1260,7 @@
 #ifdef	DEBUG
 	ohci_dump_roothub(&gohci, 1);
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 
 	len = min_t(int, len, leni);
@@ -1275,7 +1275,7 @@
 	pkt_print(dev, pipe, buffer, transfer_len, cmd, "RET(rh)",
 		  0 /*usb_pipein(pipe) */);
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 
 	return stat;
@@ -1302,7 +1302,7 @@
 	pkt_print(dev, pipe, buffer, transfer_len, setup, "SUB",
 		  usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	if (!maxsize) {
 		err("submit_common_message: pipesize for pipe %lx is zero",
@@ -1316,7 +1316,7 @@
 		return -1;
 	}
 
-	wait_ms(10);
+	mdelay(10);
 	/* ohci_dump_status(&gohci); */
 
 	/* allow more time for a BULK device to react - some are slow */
@@ -1351,7 +1351,7 @@
 		}
 
 		if (--timeout) {
-			wait_ms(1);
+			mdelay(1);
 			if (!urb_finished)
 				dbg("\%");
 
@@ -1396,7 +1396,7 @@
 	pkt_print(dev, pipe, buffer, transfer_len, setup, "RET(ctlr)",
 		  usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 
 	/* free TDs in urb_priv */
@@ -1423,7 +1423,7 @@
 	pkt_print(dev, pipe, buffer, transfer_len, setup, "SUB",
 		  usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	if (!maxsize) {
 		err("submit_control_message: pipesize for pipe %lx is zero",
@@ -1463,7 +1463,7 @@
 		writel(OHCI_OCR, &ohci->regs->cmdstatus);
 		info("USB HC TakeOver from SMM");
 		while (readl(&ohci->regs->control) & OHCI_CTRL_IR) {
-			wait_ms(10);
+			mdelay(10);
 			if (--smm_timeout == 0) {
 				err("USB HC TakeOver failed!");
 				return -1;
@@ -1600,7 +1600,7 @@
 #ifdef	DEBUG
 		ohci_dump(ohci, 1);
 #else
-		wait_ms(1);
+		mdelay(1);
 #endif
 		/* FIXME: be optimistic, hope that bug won't repeat often. */
 		/* Make some non-interrupt context restart the controller. */
@@ -1611,7 +1611,7 @@
 	}
 
 	if (ints & OHCI_INTR_WDH) {
-		wait_ms(1);
+		mdelay(1);
 
 		writel(OHCI_INTR_WDH, &regs->intrdisable);
 		stat = dl_done_list(&gohci, dl_reverse_done_list(&gohci));
@@ -1627,7 +1627,7 @@
 	/* FIXME:  this assumes SOF (1/ms) interrupts don't get lost... */
 	if (ints & OHCI_INTR_SF) {
 		unsigned int frame = m16_swap(ohci->hcca->frame_no) & 1;
-		wait_ms(1);
+		mdelay(1);
 		writel(OHCI_INTR_SF, &regs->intrdisable);
 		if (ohci->ed_rm_list[frame] != NULL)
 			writel(OHCI_INTR_SF, &regs->intrenable);
@@ -1718,7 +1718,7 @@
 	/* FIXME this is a second HC reset; why?? */
 	gohci.hc_control = OHCI_USB_RESET;
 	writel(gohci.hc_control, &gohci.regs->control);
-	wait_ms(10);
+	mdelay(10);
 
 	if (hc_start(&gohci) < 0) {
 		err("can't start usb-%s", gohci.slot_name);
@@ -1730,7 +1730,7 @@
 #ifdef	DEBUG
 	ohci_dump(&gohci, 1);
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	ohci_inited = 1;
 	urb_finished = 1;
diff --git a/arch/arm/cpu/pxa/usb.c b/arch/arm/cpu/pxa/usb.c
index 307fc6c..6c7e496 100644
--- a/arch/arm/cpu/pxa/usb.c
+++ b/arch/arm/cpu/pxa/usb.c
@@ -48,7 +48,7 @@
 #endif
 
 	writel(readl(UHCHR) | UHCHR_FHR, UHCHR);
-	wait_ms(11);
+	mdelay(11);
 	writel(readl(UHCHR) & ~UHCHR_FHR, UHCHR);
 
 	writel(readl(UHCHR) | UHCHR_FSBIR, UHCHR);
diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c
index 866dd6c..7647e11 100644
--- a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c
+++ b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c
@@ -1012,7 +1012,7 @@
 urb_priv.actual_length = 0;
 pkt_print(dev, pipe, buffer, transfer_len, cmd, "SUB(rh)", usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	if (usb_pipeint(pipe)) {
 		info("Root-Hub submit IRQ: NOT implemented");
@@ -1189,7 +1189,7 @@
 #ifdef	DEBUG
 	ohci_dump_roothub (&gohci, 1);
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 
 	len = min_t(int, len, leni);
@@ -1203,7 +1203,7 @@
 		urb_priv.actual_length = transfer_len;
 	pkt_print(dev, pipe, buffer, transfer_len, cmd, "RET(rh)", 0/*usb_pipein(pipe)*/);
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 
 	return stat;
@@ -1230,7 +1230,7 @@
 	urb_priv.actual_length = 0;
 	pkt_print(dev, pipe, buffer, transfer_len, setup, "SUB", usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	if (!maxsize) {
 		err("submit_common_message: pipesize for pipe %lx is zero",
@@ -1243,7 +1243,7 @@
 		return -1;
 	}
 
-	wait_ms(10);
+	mdelay(10);
 	/* ohci_dump_status(&gohci); */
 
 	/* allow more time for a BULK device to react - some are slow */
@@ -1267,7 +1267,7 @@
 			break;
 		}
 		if (--timeout) {
-			udelay(250); /* wait_ms(1); */
+			udelay(250); /* mdelay(1); */
 		} else {
 			err("CTL:TIMEOUT ");
 			stat = USB_ST_CRC_ERR;
@@ -1302,7 +1302,7 @@
 #ifdef DEBUG
 	pkt_print(dev, pipe, buffer, transfer_len, setup, "RET(ctlr)", usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 
 	/* free TDs in urb_priv */
@@ -1328,7 +1328,7 @@
 	urb_priv.actual_length = 0;
 	pkt_print(dev, pipe, buffer, transfer_len, setup, "SUB", usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	if (!maxsize) {
 		err("submit_control_message: pipesize for pipe %lx is zero",
@@ -1367,7 +1367,7 @@
 		writel (OHCI_OCR, &ohci->regs->cmdstatus); /* request ownership */
 		info("USB HC TakeOver from SMM");
 		while (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
-			wait_ms (10);
+			mdelay (10);
 			if (--smm_timeout == 0) {
 				err("USB HC TakeOver failed!");
 				return -1;
@@ -1490,7 +1490,7 @@
 #ifdef	DEBUG
 		ohci_dump (ohci, 1);
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 		/* FIXME: be optimistic, hope that bug won't repeat often. */
 		/* Make some non-interrupt context restart the controller. */
@@ -1501,7 +1501,7 @@
 	}
 
 	if (ints & OHCI_INTR_WDH) {
-		wait_ms(1);
+		mdelay(1);
 		writel (OHCI_INTR_WDH, &regs->intrdisable);
 		stat = dl_done_list (&gohci, dl_reverse_done_list (&gohci));
 		writel (OHCI_INTR_WDH, &regs->intrenable);
@@ -1516,7 +1516,7 @@
 	/* FIXME:  this assumes SOF (1/ms) interrupts don't get lost... */
 	if (ints & OHCI_INTR_SF) {
 		unsigned int frame = m16_swap (ohci->hcca->frame_no) & 1;
-		wait_ms(1);
+		mdelay(1);
 		writel (OHCI_INTR_SF, &regs->intrdisable);
 		if (ohci->ed_rm_list[frame] != NULL)
 			writel (OHCI_INTR_SF, &regs->intrenable);
@@ -1686,7 +1686,7 @@
 
 	/* FIXME this is a second HC reset; why?? */
 	writel (gohci.hc_control = OHCI_USB_RESET, &gohci.regs->control);
-	wait_ms (10);
+	mdelay (10);
 
 	if (hc_start (&gohci) < 0)
 		goto errout;
@@ -1694,7 +1694,7 @@
 #ifdef	DEBUG
 	ohci_dump (&gohci, 1);
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	ohci_inited = 1;
 	return 0;
diff --git a/arch/powerpc/cpu/mpc5xxx/usb_ohci.c b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c
index d250c19..6d91525 100644
--- a/arch/powerpc/cpu/mpc5xxx/usb_ohci.c
+++ b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c
@@ -1269,7 +1269,7 @@
 		}
 
 		if (--timeout) {
-			wait_ms(1);
+			mdelay(1);
 			if (!urb_finished)
 				dbg("\%");
 
@@ -1372,7 +1372,7 @@
 		writel (OHCI_OCR, &ohci->regs->cmdstatus); /* request ownership */
 		info("USB HC TakeOver from SMM");
 		while (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
-			wait_ms (10);
+			mdelay (10);
 			if (--smm_timeout == 0) {
 				err("USB HC TakeOver failed!");
 				return -1;
@@ -1529,7 +1529,7 @@
 	/* FIXME:  this assumes SOF (1/ms) interrupts don't get lost... */
 	if (ints & OHCI_INTR_SF) {
 		unsigned int frame = ohci_cpu_to_le16 (ohci->hcca->frame_no) & 1;
-		wait_ms(1);
+		mdelay(1);
 		writel (OHCI_INTR_SF, &regs->intrdisable);
 		if (ohci->ed_rm_list[frame] != NULL)
 			writel (OHCI_INTR_SF, &regs->intrenable);
diff --git a/arch/powerpc/cpu/ppc4xx/usb_ohci.c b/arch/powerpc/cpu/ppc4xx/usb_ohci.c
index 4fb7031..14c6a28 100644
--- a/arch/powerpc/cpu/ppc4xx/usb_ohci.c
+++ b/arch/powerpc/cpu/ppc4xx/usb_ohci.c
@@ -1274,7 +1274,7 @@
 		}
 
 		if (--timeout) {
-			wait_ms(1);
+			mdelay(1);
 			if (!urb_finished)
 				dbg("\%");
 
@@ -1377,7 +1377,7 @@
 		writel (OHCI_OCR, &ohci->regs->cmdstatus); /* request ownership */
 		info("USB HC TakeOver from SMM");
 		while (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
-			wait_ms (10);
+			mdelay (10);
 			if (--smm_timeout == 0) {
 				err("USB HC TakeOver failed!");
 				return -1;
@@ -1534,7 +1534,7 @@
 	/* FIXME:  this assumes SOF (1/ms) interrupts don't get lost... */
 	if (ints & OHCI_INTR_SF) {
 		unsigned int frame = ohci_cpu_to_le16 (ohci->hcca->frame_no) & 1;
-		wait_ms(1);
+		mdelay(1);
 		writel (OHCI_INTR_SF, &regs->intrdisable);
 		if (ohci->ed_rm_list[frame] != NULL)
 			writel (OHCI_INTR_SF, &regs->intrenable);
diff --git a/arch/sparc/cpu/leon3/usb_uhci.c b/arch/sparc/cpu/leon3/usb_uhci.c
index 358e52a..62cc25d 100644
--- a/arch/sparc/cpu/leon3/usb_uhci.c
+++ b/arch/sparc/cpu/leon3/usb_uhci.c
@@ -515,9 +515,9 @@
 	out16r(usb_base_addr + USBCMD, USBCMD_GRESET | USBCMD_RS);
 	/* Turn off all interrupts */
 	out16r(usb_base_addr + USBINTR, 0);
-	wait_ms(50);
+	mdelay(50);
 	out16r(usb_base_addr + USBCMD, 0);
-	wait_ms(10);
+	mdelay(10);
 }
 
 void start_hc(void)
@@ -1044,7 +1044,7 @@
 			status = (status & 0xfff5) | USBPORTSC_PR;
 			out16r(usb_base_addr + USBPORTSC1 + 2 * (wIndex - 1),
 			       status);
-			wait_ms(10);
+			mdelay(10);
 			status = (status & 0xfff5) & ~USBPORTSC_PR;
 			out16r(usb_base_addr + USBPORTSC1 + 2 * (wIndex - 1),
 			       status);
@@ -1052,7 +1052,7 @@
 			status = (status & 0xfff5) | USBPORTSC_PE;
 			out16r(usb_base_addr + USBPORTSC1 + 2 * (wIndex - 1),
 			       status);
-			wait_ms(10);
+			mdelay(10);
 			status = (status & 0xfff5) | 0xa;
 			out16r(usb_base_addr + USBPORTSC1 + 2 * (wIndex - 1),
 			       status);
diff --git a/board/efikamx/efikamx-usb.c b/board/efikamx/efikamx-usb.c
index ac2d2e9..618b39d 100644
--- a/board/efikamx/efikamx-usb.c
+++ b/board/efikamx/efikamx-usb.c
@@ -187,7 +187,7 @@
 
 	ulpi_write(&ulpi_vp, &ulpi->otg_ctrl_set, ULPI_OTG_CHRGVBUS);
 
-	wait_ms(50);
+	mdelay(50);
 
 	/* terminate the reset */
 	*reg = ehci_readl(status_reg);
diff --git a/board/mcc200/auto_update.c b/board/mcc200/auto_update.c
index 4152873..b9ff311 100644
--- a/board/mcc200/auto_update.c
+++ b/board/mcc200/auto_update.c
@@ -284,7 +284,7 @@
 	 */
 	debug ("flash_sect_erase(%lx, %lx);\n", start, end);
 	flash_sect_erase(start, end);
-	wait_ms(100);
+	mdelay(100);
 #ifdef CONFIG_PROGRESSBAR
 	show_progress(end - start, totsize);
 #endif
@@ -352,7 +352,7 @@
 	 * Read keypad status
 	 */
 	i2c_read(I2C_PSOC_KEYPAD_ADDR, 0, 0, keypad_status1, 2);
-	wait_ms(500);
+	mdelay(500);
 	i2c_read(I2C_PSOC_KEYPAD_ADDR, 0, 0, keypad_status2, 2);
 
 	/*
diff --git a/board/mpl/common/usb_uhci.c b/board/mpl/common/usb_uhci.c
index 89d2e0a..ddca587 100644
--- a/board/mpl/common/usb_uhci.c
+++ b/board/mpl/common/usb_uhci.c
@@ -435,9 +435,9 @@
 	out16r( usb_base_addr + USBCMD,USBCMD_GRESET | USBCMD_RS);
 	/* Turn off all interrupts */
 	out16r(usb_base_addr + USBINTR,0);
-	wait_ms(50);
+	mdelay(50);
 	out16r( usb_base_addr + USBCMD,0);
-	wait_ms(10);
+	mdelay(10);
 }
 
 void start_hc(void)
@@ -926,13 +926,13 @@
 			status = in16r(usb_base_addr+USBPORTSC1+2*(wIndex-1));
 			status = (status & 0xfff5) | USBPORTSC_PR;
 			out16r(usb_base_addr+USBPORTSC1+2*(wIndex-1),status);
-			wait_ms(10);
+			mdelay(10);
 			status = (status & 0xfff5) & ~USBPORTSC_PR;
 			out16r(usb_base_addr+USBPORTSC1+2*(wIndex-1),status);
 			udelay(10);
 			status = (status & 0xfff5) | USBPORTSC_PE;
 			out16r(usb_base_addr+USBPORTSC1+2*(wIndex-1),status);
-			wait_ms(10);
+			mdelay(10);
 			status = (status & 0xfff5) | 0xa;
 			out16r(usb_base_addr+USBPORTSC1+2*(wIndex-1),status);
 			len=0;
diff --git a/board/renesas/sh7785lcr/selfcheck.c b/board/renesas/sh7785lcr/selfcheck.c
index 6d92c83..2cd2ad0 100644
--- a/board/renesas/sh7785lcr/selfcheck.c
+++ b/board/renesas/sh7785lcr/selfcheck.c
@@ -33,12 +33,6 @@
 
 #define SM107_DEVICEID		(0x13e00060 + NOCACHE_OFFSET)
 
-static void wait_ms(unsigned long time)
-{
-	while (time--)
-		udelay(1000);
-}
-
 static void test_pld(void)
 {
 	printf("PLD version = %04x\n", readb(PLD_VERSR));
@@ -53,10 +47,10 @@
 {
 	printf("turn on LEDs 3, 5, 7, 9\n");
 	writeb(0x55, PLD_LEDCR);
-	wait_ms(2000);
+	mdelay(2000);
 	printf("turn on LEDs 4, 6, 8, 10\n");
 	writeb(0xaa, PLD_LEDCR);
-	wait_ms(2000);
+	mdelay(2000);
 	writeb(0x00, PLD_LEDCR);
 }
 
diff --git a/common/usb.c b/common/usb.c
index 3c9ede4..1ec30bc 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -81,16 +81,6 @@
  */
 static void usb_scan_devices(void);
 
-/***********************************************************************
- * wait_ms
- */
-
-inline void wait_ms(unsigned long ms)
-{
-	while (ms-- > 0)
-		udelay(1000);
-}
-
 /***************************************************************************
  * Init USB Device
  */
@@ -209,7 +199,7 @@
 	while (timeout--) {
 		if (!((volatile unsigned long)dev->status & USB_ST_NOT_PROC))
 			break;
-		wait_ms(1);
+		mdelay(1);
 	}
 	if (dev->status)
 		return -1;
@@ -233,7 +223,7 @@
 	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)
@@ -897,7 +887,7 @@
 		return 1;
 	}
 
-	wait_ms(10);	/* Let the SET_ADDRESS settle */
+	mdelay(10);	/* Let the SET_ADDRESS settle */
 
 	tmp = sizeof(dev->descriptor);
 
diff --git a/common/usb_hub.c b/common/usb_hub.c
index 84d0d3f..e0edaad 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -120,7 +120,7 @@
 	}
 
 	/* Wait at least 100 msec for power to become stable */
-	wait_ms(max(pgood_delay, (unsigned)100));
+	mdelay(max(pgood_delay, (unsigned)100));
 }
 
 void usb_hub_reset(void)
@@ -160,7 +160,7 @@
 	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",
@@ -187,7 +187,7 @@
 		if (portstatus & USB_PORT_STAT_ENABLE)
 			break;
 
-		wait_ms(200);
+		mdelay(200);
 	}
 
 	if (tries == MAX_TRIES) {
@@ -232,7 +232,7 @@
 		if (!(portstatus & USB_PORT_STAT_CONNECTION))
 			return;
 	}
-	wait_ms(200);
+	mdelay(200);
 
 	/* Reset the port */
 	if (hub_port_reset(dev, port, &portstatus) < 0) {
@@ -240,7 +240,7 @@
 		return;
 	}
 
-	wait_ms(200);
+	mdelay(200);
 
 	/* Allocate a new device struct for it */
 	usb = usb_alloc_new_device();
diff --git a/common/usb_storage.c b/common/usb_storage.c
index de84c8d..1208333 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -438,19 +438,19 @@
 	}
 
 	/* long wait for reset */
-	wait_ms(150);
+	mdelay(150);
 	USB_STOR_PRINTF("BBB_reset result %d: status %lX reset\n", result,
 			us->pusb_dev->status);
 	pipe = usb_rcvbulkpipe(us->pusb_dev, us->ep_in);
 	result = usb_clear_halt(us->pusb_dev, pipe);
 	/* long wait for reset */
-	wait_ms(150);
+	mdelay(150);
 	USB_STOR_PRINTF("BBB_reset result %d: status %lX clearing IN endpoint\n",
 			result, us->pusb_dev->status);
 	/* long wait for reset */
 	pipe = usb_sndbulkpipe(us->pusb_dev, us->ep_out);
 	result = usb_clear_halt(us->pusb_dev, pipe);
-	wait_ms(150);
+	mdelay(150);
 	USB_STOR_PRINTF("BBB_reset result %d: status %lX"
 			" clearing OUT endpoint\n", result,
 			us->pusb_dev->status);
@@ -478,7 +478,7 @@
 				 USB_CNTL_TIMEOUT * 5);
 
 	/* long wait for reset */
-	wait_ms(1500);
+	mdelay(1500);
 	USB_STOR_PRINTF("CB_reset result %d: status %lX"
 			" clearing endpoint halt\n", result,
 			us->pusb_dev->status);
@@ -621,7 +621,7 @@
 	while (timeout--) {
 		if ((volatile int *) us->ip_wanted == 0)
 			break;
-		wait_ms(10);
+		mdelay(10);
 	}
 	if (us->ip_wanted) {
 		printf("	Did not get interrupt on CBI\n");
@@ -692,7 +692,7 @@
 		usb_stor_BBB_reset(us);
 		return USB_STOR_TRANSPORT_FAILED;
 	}
-	wait_ms(5);
+	mdelay(5);
 	pipein = usb_rcvbulkpipe(us->pusb_dev, us->ep_in);
 	pipeout = usb_sndbulkpipe(us->pusb_dev, us->ep_out);
 	/* DATA phase + error handling */
@@ -884,7 +884,7 @@
 				srb->sense_buf[12], srb->sense_buf[13]);
 			return USB_STOR_TRANSPORT_FAILED;
 		} else {
-			wait_ms(100);
+			mdelay(100);
 			goto do_retry;
 		}
 		break;
@@ -960,7 +960,7 @@
 		if (ss->transport(srb, ss) == USB_STOR_TRANSPORT_GOOD)
 			return 0;
 		usb_request_sense(srb, ss);
-		wait_ms(100);
+		mdelay(100);
 	} while (retries--);
 
 	return -1;
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index d6fee81..ef5afc2 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -776,7 +776,7 @@
 		goto unknown;
 	}
 
-	wait_ms(1);
+	mdelay(1);
 	len = min3(srclen, le16_to_cpu(req->length), length);
 	if (srcptr != NULL && len > 0)
 		memcpy(buffer, srcptr, len);
@@ -857,7 +857,7 @@
 	ehci_writel(&hcor->or_configflag, cmd);
 	/* unblock posted write */
 	cmd = ehci_readl(&hcor->or_usbcmd);
-	wait_ms(5);
+	mdelay(5);
 	reg = HC_VERSION(ehci_readl(&hccr->cr_capbase));
 	printf("USB EHCI %x.%02x\n", reg >> 8, reg & 0xff);
 
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index abdcbb4..5ef34c3 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -578,7 +578,7 @@
 			/* When root hub or any of its ports is going
 			   to come out of suspend, it may take more
 			   than 10ms for status bits to stabilize. */
-			wait_ms(20);
+			mdelay(20);
 		}
 
 		if (intstat & HCINT_SO) {
@@ -679,7 +679,7 @@
 	/* Pack data into FIFO ram */
 	pack_fifo(isp116x, dev, pipe, ptd, 1, buffer, len);
 #ifdef EXTRA_DELAY
-	wait_ms(EXTRA_DELAY);
+	mdelay(EXTRA_DELAY);
 #endif
 
 	/* Start the data transfer */
@@ -983,11 +983,11 @@
 						       HCRHPORT1 + wIndex - 1);
 				if (!(tmp & RH_PS_PRS))
 					break;
-				wait_ms(1);
+				mdelay(1);
 			}
 			isp116x_write_reg32(isp116x, HCRHPORT1 + wIndex - 1,
 					    RH_PS_PRS);
-			wait_ms(10);
+			mdelay(10);
 
 			len = 0;
 			break;
@@ -1251,7 +1251,7 @@
 	isp116x_write_reg32(isp116x, HCCMDSTAT, HCCMDSTAT_HCR);
 	while (--retries) {
 		/* It usually resets within 1 ms */
-		wait_ms(1);
+		mdelay(1);
 		if (!(isp116x_read_reg32(isp116x, HCCMDSTAT) & HCCMDSTAT_HCR))
 			break;
 	}
@@ -1278,7 +1278,7 @@
 		clkrdy = isp116x_read_reg16(isp116x, HCuPINT) & HCuPINT_CLKRDY;
 		if (clkrdy)
 			break;
-		wait_ms(1);
+		mdelay(1);
 	}
 	if (!clkrdy) {
 		ERR("clock not ready after %dms", timeout);
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 1a428e9..d24f2f1 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1279,7 +1279,7 @@
 pkt_print(NULL, dev, pipe, buffer, transfer_len,
 	  cmd, "SUB(rh)", usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	if (usb_pipeint(pipe)) {
 		info("Root-Hub submit IRQ: NOT implemented");
@@ -1360,7 +1360,7 @@
 			OK(0);
 		case (RH_PORT_POWER):
 			WR_RH_PORTSTAT(RH_PS_PPS);
-			wait_ms(100);
+			mdelay(100);
 			OK(0);
 		case (RH_PORT_ENABLE): /* BUG IN HUP CODE *********/
 			if (RD_RH_PORTSTAT & RH_PS_CCS)
@@ -1465,7 +1465,7 @@
 #ifdef	DEBUG
 	ohci_dump_roothub(&gohci, 1);
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 
 	len = min_t(int, len, leni);
@@ -1478,7 +1478,7 @@
 	pkt_print(NULL, dev, pipe, buffer,
 		  transfer_len, cmd, "RET(rh)", 0/*usb_pipein(pipe)*/);
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 
 	return stat;
@@ -1516,7 +1516,7 @@
 	pkt_print(urb, dev, pipe, buffer, transfer_len,
 		  setup, "SUB", usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	if (!maxsize) {
 		err("submit_common_message: pipesize for pipe %lx is zero",
@@ -1530,7 +1530,7 @@
 	}
 
 #if 0
-	wait_ms(10);
+	mdelay(10);
 	/* ohci_dump_status(&gohci); */
 #endif
 
@@ -1560,7 +1560,7 @@
 		}
 
 		if (--timeout) {
-			wait_ms(1);
+			mdelay(1);
 			if (!urb->finished)
 				dbg("*");
 
@@ -1580,7 +1580,7 @@
 	pkt_print(urb, dev, pipe, buffer, transfer_len,
 		  setup, "RET(ctlr)", usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 
 	/* free TDs in urb_priv */
@@ -1607,7 +1607,7 @@
 	pkt_print(NULL, dev, pipe, buffer, transfer_len,
 		  setup, "SUB", usb_pipein(pipe));
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	if (!maxsize) {
 		err("submit_control_message: pipesize for pipe %lx is zero",
@@ -1677,7 +1677,7 @@
 		ohci_writel(OHCI_OCR, &ohci->regs->cmdstatus);
 		info("USB HC TakeOver from SMM");
 		while (ohci_readl(&ohci->regs->control) & OHCI_CTRL_IR) {
-			wait_ms(10);
+			mdelay(10);
 			if (--smm_timeout == 0) {
 				err("USB HC TakeOver failed!");
 				return -1;
@@ -1813,7 +1813,7 @@
 #ifdef	DEBUG
 		ohci_dump(ohci, 1);
 #else
-		wait_ms(1);
+		mdelay(1);
 #endif
 		/* FIXME: be optimistic, hope that bug won't repeat often. */
 		/* Make some non-interrupt context restart the controller. */
@@ -1824,7 +1824,7 @@
 	}
 
 	if (ints & OHCI_INTR_WDH) {
-		wait_ms(1);
+		mdelay(1);
 		ohci_writel(OHCI_INTR_WDH, &regs->intrdisable);
 		(void)ohci_readl(&regs->intrdisable); /* flush */
 		stat = dl_done_list(&gohci);
@@ -1841,7 +1841,7 @@
 	/* FIXME:  this assumes SOF (1/ms) interrupts don't get lost... */
 	if (ints & OHCI_INTR_SF) {
 		unsigned int frame = m16_swap(ohci->hcca->frame_no) & 1;
-		wait_ms(1);
+		mdelay(1);
 		ohci_writel(OHCI_INTR_SF, &regs->intrdisable);
 		if (ohci->ed_rm_list[frame] != NULL)
 			ohci_writel(OHCI_INTR_SF, &regs->intrenable);
@@ -1973,7 +1973,7 @@
 #ifdef	DEBUG
 	ohci_dump(&gohci, 1);
 #else
-	wait_ms(1);
+	mdelay(1);
 #endif
 	ohci_inited = 1;
 	return 0;
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index aa753d8..ab1b8d0 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -497,7 +497,7 @@
 
 	old_syssts = r8a66597_read(r8a66597, get_syssts_reg(port) & LNST);
 	while (count > 0) {
-		wait_ms(R8A66597_RH_POLL_TIME);
+		mdelay(R8A66597_RH_POLL_TIME);
 
 		syssts = r8a66597_read(r8a66597, get_syssts_reg(port) & LNST);
 		if (syssts == old_syssts) {
@@ -511,11 +511,11 @@
 
 static void r8a66597_bus_reset(struct r8a66597 *r8a66597, int port)
 {
-	wait_ms(10);
+	mdelay(10);
 	r8a66597_mdfy(r8a66597, USBRST, USBRST | UACT, get_dvstctr_reg(port));
-	wait_ms(50);
+	mdelay(50);
 	r8a66597_mdfy(r8a66597, UACT, USBRST | UACT, get_dvstctr_reg(port));
-	wait_ms(50);
+	mdelay(50);
 }
 
 static int check_usb_device_connecting(struct r8a66597 *r8a66597)
@@ -823,7 +823,7 @@
 		stat = USB_ST_STALLED;
 	}
 
-	wait_ms(1);
+	mdelay(1);
 
 	len = min_t(int, len, leni);
 
@@ -918,7 +918,7 @@
 	r8a66597->reg = CONFIG_R8A66597_BASE_ADDR;
 
 	disable_controller(r8a66597);
-	wait_ms(100);
+	mdelay(100);
 
 	enable_controller(r8a66597);
 	r8a66597_port_power(r8a66597, 0 , 1);
@@ -926,7 +926,7 @@
 	/* check usb device */
 	check_usb_device_connecting(r8a66597);
 
-	wait_ms(50);
+	mdelay(50);
 
 	return 0;
 }
diff --git a/include/usb.h b/include/usb.h
index 4534738..48e4bcd 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -199,7 +199,6 @@
 			void *buffer, int transfer_len, int interval);
 int usb_disable_asynch(int disable);
 int usb_maxpacket(struct usb_device *dev, unsigned long pipe);
-inline void wait_ms(unsigned long ms);
 int usb_get_configuration_no(struct usb_device *dev, unsigned char *buffer,
 				int cfgno);
 int usb_get_report(struct usb_device *dev, int ifnum, unsigned char type,
