summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-03-05 13:47:00 +0000
committerMarek Vasut <marek.vasut@gmail.com>2012-03-19 00:08:16 +0100
commit5b84dd67cfd8c07c4adff935310224a03d0c4d01 (patch)
tree4e3299dd7c56e993ec51d0a9364e2d95c0393c74 /board
parentb9743081058d847a9150dc8bd9dd2b74d78105a2 (diff)
downloadu-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 'board')
-rw-r--r--board/efikamx/efikamx-usb.c2
-rw-r--r--board/mcc200/auto_update.c4
-rw-r--r--board/mpl/common/usb_uhci.c8
-rw-r--r--board/renesas/sh7785lcr/selfcheck.c10
4 files changed, 9 insertions, 15 deletions
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 @@ void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg)
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 @@ int au_do_update(int idx, long sz)
*/
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 @@ int do_auto_update(void)
* 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 @@ void reset_hc(void)
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 @@ int uhci_submit_rh_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
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 @@ static void test_led(void)
{
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);
}