diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 8 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c | 2 | ||||
-rw-r--r-- | firmware/target/arm/system-arm.h | 6 |
3 files changed, 11 insertions, 5 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) |
diff --git a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c index 735020cfad..c9dd69d47b 100644 --- a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c +++ b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c | |||
@@ -46,7 +46,7 @@ static int xoffset = 20; /* needed for flip */ | |||
46 | /* we need to write a red pixel for correct button reads | 46 | /* we need to write a red pixel for correct button reads |
47 | * (see lcd_button_support()),but that must not happen while the lcd is updating | 47 | * (see lcd_button_support()),but that must not happen while the lcd is updating |
48 | * so block lcd_button_support the during updates */ | 48 | * so block lcd_button_support the during updates */ |
49 | static bool lcd_busy = false; | 49 | static volatile int lcd_busy = false; |
50 | 50 | ||
51 | static inline void lcd_delay(int x) | 51 | static inline void lcd_delay(int x) |
52 | { | 52 | { |
diff --git a/firmware/target/arm/system-arm.h b/firmware/target/arm/system-arm.h index 0608f50a02..96afba4568 100644 --- a/firmware/target/arm/system-arm.h +++ b/firmware/target/arm/system-arm.h | |||
@@ -243,7 +243,7 @@ static inline void enable_interrupt(int mask) | |||
243 | "mrs %0, cpsr \n" | 243 | "mrs %0, cpsr \n" |
244 | "bic %0, %0, %1 \n" | 244 | "bic %0, %0, %1 \n" |
245 | "msr cpsr_c, %0 \n" | 245 | "msr cpsr_c, %0 \n" |
246 | : "=&r"(tmp) : "i"(mask)); | 246 | : "=&r"(tmp) : "r"(mask)); |
247 | } | 247 | } |
248 | 248 | ||
249 | static inline void disable_interrupt(int mask) | 249 | static inline void disable_interrupt(int mask) |
@@ -254,7 +254,7 @@ static inline void disable_interrupt(int mask) | |||
254 | "mrs %0, cpsr \n" | 254 | "mrs %0, cpsr \n" |
255 | "orr %0, %0, %1 \n" | 255 | "orr %0, %0, %1 \n" |
256 | "msr cpsr_c, %0 \n" | 256 | "msr cpsr_c, %0 \n" |
257 | : "=&r"(tmp) : "i"(mask)); | 257 | : "=&r"(tmp) : "r"(mask)); |
258 | } | 258 | } |
259 | 259 | ||
260 | static inline int disable_interrupt_save(int mask) | 260 | static inline int disable_interrupt_save(int mask) |
@@ -266,7 +266,7 @@ static inline int disable_interrupt_save(int mask) | |||
266 | "orr %0, %1, %2 \n" | 266 | "orr %0, %1, %2 \n" |
267 | "msr cpsr_c, %0 \n" | 267 | "msr cpsr_c, %0 \n" |
268 | : "=&r"(tmp), "=&r"(cpsr) | 268 | : "=&r"(tmp), "=&r"(cpsr) |
269 | : "i"(mask)); | 269 | : "r"(mask)); |
270 | return cpsr; | 270 | return cpsr; |
271 | } | 271 | } |
272 | 272 | ||