usb: replace wait_ms() with mdelay()

Common code has a mdelay() func, so use that instead of the usb-specific
wait_ms() func.  This also fixes the build errors:

ohci-hcd.c: In function 'submit_common_msg':
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1519:9: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1816:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1827:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1844:10: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1563:11: sorry, unimplemented: called from here
/usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
ohci-hcd.c:1583:9: sorry, unimplemented: called from here
make[1]: *** [ohci-hcd.o] Error 1

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Marek Vasut <marex@denx.de>
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);