diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-03-05 13:47:00 +0000 |
---|---|---|
committer | Marek Vasut <marek.vasut@gmail.com> | 2012-03-19 00:08:16 +0100 |
commit | 5b84dd67cfd8c07c4adff935310224a03d0c4d01 (patch) | |
tree | 4e3299dd7c56e993ec51d0a9364e2d95c0393c74 /drivers/usb/host | |
parent | b9743081058d847a9150dc8bd9dd2b74d78105a2 (diff) | |
download | u-boot-imx-5b84dd67cfd8c07c4adff935310224a03d0c4d01.zip u-boot-imx-5b84dd67cfd8c07c4adff935310224a03d0c4d01.tar.gz u-boot-imx-5b84dd67cfd8c07c4adff935310224a03d0c4d01.tar.bz2 |
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>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/isp116x-hcd.c | 12 | ||||
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 28 | ||||
-rw-r--r-- | drivers/usb/host/r8a66597-hcd.c | 14 |
4 files changed, 29 insertions, 29 deletions
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 @@ ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer, 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 @@ int usb_lowlevel_init(void) 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 @@ static int isp116x_interrupt(struct isp116x *isp116x) /* 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 @@ retry_same: /* 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 @@ static int isp116x_submit_rh_msg(struct usb_device *dev, unsigned long pipe, 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 @@ static int isp116x_sw_reset(struct isp116x *isp116x) 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 @@ static int isp116x_reset(struct isp116x *isp116x) 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 @@ static int ohci_submit_rh_msg(struct usb_device *dev, unsigned long pipe, 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 @@ pkt_print(NULL, dev, pipe, buffer, transfer_len, 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 @@ pkt_print(NULL, dev, pipe, buffer, transfer_len, #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, 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 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer, 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 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer, } #if 0 - wait_ms(10); + mdelay(10); /* ohci_dump_status(&gohci); */ #endif @@ -1560,7 +1560,7 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer, } if (--timeout) { - wait_ms(1); + mdelay(1); if (!urb->finished) dbg("*"); @@ -1580,7 +1580,7 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer, 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 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer, 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 @@ static int hc_reset(ohci_t *ohci) 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 @@ static int hc_interrupt(void) #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 @@ static int hc_interrupt(void) } if (ints & OHCI_INTR_WDH) { - wait_ms(1); + mdelay(1); ohci_writel(OHCI_INTR_WDH, ®s->intrdisable); (void)ohci_readl(®s->intrdisable); /* flush */ stat = dl_done_list(&gohci); @@ -1841,7 +1841,7 @@ static int hc_interrupt(void) /* 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, ®s->intrdisable); if (ohci->ed_rm_list[frame] != NULL) ohci_writel(OHCI_INTR_SF, ®s->intrenable); @@ -1973,7 +1973,7 @@ int usb_lowlevel_init(void) #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 @@ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port) 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_check_syssts(struct r8a66597 *r8a66597, int port) 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 @@ static int r8a66597_submit_rh_msg(struct usb_device *dev, unsigned long pipe, stat = USB_ST_STALLED; } - wait_ms(1); + mdelay(1); len = min_t(int, len, leni); @@ -918,7 +918,7 @@ int usb_lowlevel_init(void) 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 @@ int usb_lowlevel_init(void) /* check usb device */ check_usb_device_connecting(r8a66597); - wait_ms(50); + mdelay(50); return 0; } |