summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2011-10-12 02:31:39 +0000
committerWolfgang Denk <wd@denx.de>2011-10-22 01:16:08 +0200
commitc4c9fbebae6a62d538817d0ccee698adaafc5d66 (patch)
tree91e9e2b82568b32bf3135bdc25d0a852f6c31095 /drivers/block
parent712fbcf384b7fbe6118325f21dad98150b24f13b (diff)
downloadu-boot-imx-c4c9fbebae6a62d538817d0ccee698adaafc5d66.zip
u-boot-imx-c4c9fbebae6a62d538817d0ccee698adaafc5d66.tar.gz
u-boot-imx-c4c9fbebae6a62d538817d0ccee698adaafc5d66.tar.bz2
consolidate mdelay by providing a common function for all users
There are several mdelay() definitions in the driver and board code. Remove them all and provide a common mdelay() in lib/time.c. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/fsl_sata.c7
-rw-r--r--drivers/block/ftide020.c2
2 files changed, 0 insertions, 9 deletions
diff --git a/drivers/block/fsl_sata.c b/drivers/block/fsl_sata.c
index b101bd7..6b35173 100644
--- a/drivers/block/fsl_sata.c
+++ b/drivers/block/fsl_sata.c
@@ -50,13 +50,6 @@ static struct fsl_sata_info fsl_sata_info[] = {
#endif
};
-static inline void mdelay(unsigned long msec)
-{
- unsigned long i;
- for (i = 0; i < msec; i++)
- udelay(1000);
-}
-
static inline void sdelay(unsigned long sec)
{
unsigned long i;
diff --git a/drivers/block/ftide020.c b/drivers/block/ftide020.c
index 2eef3e9..4a7a07f 100644
--- a/drivers/block/ftide020.c
+++ b/drivers/block/ftide020.c
@@ -54,8 +54,6 @@
#define WRITE_CMD(x) outl((x), &ftide020->cmd_fifo) /* 0x04 */
#define READ_STATUS() inl(&ftide020->cmd_fifo) /* 0x04 */
-#define mdelay(n) ({unsigned long msec = (n); while (msec--) udelay(1000); })
-
void ftide_set_device(int cx8, int dev)
{
static struct ftide020_s *ftide020 = (struct ftide020_s *) FTIDE_BASE;