diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-11-15 17:23:25 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-11-15 17:23:25 +0000 |
commit | a1bc3401f1c65524ded556f131283b8864ac3733 (patch) | |
tree | 815006b4bda1ce692c45751e41b0103b32a2dda8 /firmware/target/arm/as3525/ata_sd_as3525.c | |
parent | 8ceaf7bb7277f61b1ebfce816a0e05a3674d25c4 (diff) | |
download | rockbox-a1bc3401f1c65524ded556f131283b8864ac3733.tar.gz rockbox-a1bc3401f1c65524ded556f131283b8864ac3733.zip |
Fix a few possible problems discovered in -O0 / eabi experiments.
- two essential parts of Sansa AMS drivers are optimzed away in newer gcc, so mark them volatile.
- use "r" instead of "i" (which is apparently invalid syntax) for the input list in some inline assembly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23634 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/ata_sd_as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index 65df027c30..f00badba69 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c | |||
@@ -129,7 +129,13 @@ static volatile unsigned int transfer_error[NUM_VOLUMES]; | |||
129 | static unsigned char aligned_buffer[UNALIGNED_NUM_SECTORS* SECTOR_SIZE] __attribute__((aligned(32))); /* align on cache line size */ | 129 | static unsigned char aligned_buffer[UNALIGNED_NUM_SECTORS* SECTOR_SIZE] __attribute__((aligned(32))); /* align on cache line size */ |
130 | static unsigned char *uncached_buffer = UNCACHED_ADDR(&aligned_buffer[0]); | 130 | static unsigned char *uncached_buffer = UNCACHED_ADDR(&aligned_buffer[0]); |
131 | 131 | ||
132 | static inline void mci_delay(void) { int i = 0xffff; while(i--) ; } | 132 | static inline void mci_delay(void) |
133 | { | ||
134 | int i = 0xffff; | ||
135 | do { | ||
136 | asm volatile("nop\n"); | ||
137 | } while (--i); | ||
138 | } | ||
133 | 139 | ||
134 | #ifdef HAVE_HOTSWAP | 140 | #ifdef HAVE_HOTSWAP |
135 | static int sd1_oneshot_callback(struct timeout *tmo) | 141 | static int sd1_oneshot_callback(struct timeout *tmo) |