diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-04-27 09:34:29 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-04-27 09:34:29 +0000 |
commit | 845af676f8a37910613e7ce6b59dc229bb1a89c1 (patch) | |
tree | 0cc577ce1f31aea64a70b83f9323512da56912d4 /firmware/target/arm/as3525/sd-as3525.c | |
parent | f2f34881ec84fb18020ae9a492f347e87c36359c (diff) |
as3525(v2): Add a somewhat inaccurate udelay (-0.5/+1.0µs). It should work good for some huge delays.
Use it in fuzev2 to improve some big delays (correct the biggest one to actually wait for the fifo to empty), and use it in the sd drivers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25734 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sd-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/firmware/target/arm/as3525/sd-as3525.c b/firmware/target/arm/as3525/sd-as3525.c index 5ccb659e00..1cf7e51cf8 100644 --- a/firmware/target/arm/as3525/sd-as3525.c +++ b/firmware/target/arm/as3525/sd-as3525.c @@ -141,13 +141,8 @@ static volatile unsigned int transfer_error[NUM_VOLUMES]; static unsigned char aligned_buffer[UNALIGNED_NUM_SECTORS* SD_BLOCK_SIZE] __attribute__((aligned(32))); /* align on cache line size */ static unsigned char *uncached_buffer = UNCACHED_ADDR(&aligned_buffer[0]); -static inline void mci_delay(void) -{ - int i = 0xffff; - do { - asm volatile("nop\n"); - } while (--i); -} + +static inline void mci_delay(void) { udelay(1000) ; } static inline bool card_detect_target(void) @@ -159,6 +154,7 @@ static inline bool card_detect_target(void) #endif } + #ifdef HAVE_HOTSWAP static int sd1_oneshot_callback(struct timeout *tmo) { |