diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-05-08 12:09:14 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-05-08 12:09:14 +0000 |
commit | 6dd6ea74af4ebfa1112f2e606db67357c0e2632f (patch) | |
tree | 5506268620a9dfe49923a4e6e5c957bedcd6fabe /firmware/rolo.c | |
parent | e616092fd566e9d0455727ef32a2879f15ac80da (diff) | |
download | rockbox-6dd6ea74af4ebfa1112f2e606db67357c0e2632f.tar.gz rockbox-6dd6ea74af4ebfa1112f2e606db67357c0e2632f.zip |
Gigabeat S RoLo: Properly execute firmware copy from an IRAM stub because the currently running image was being overwritten in place. Minor tweak to rolo.c based on imx31 errata sheet about not masking FIQ without masking IRQ which is fine to use on all ARM anyway.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17414 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/rolo.c')
-rw-r--r-- | firmware/rolo.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/firmware/rolo.c b/firmware/rolo.c index 5dbb6f9874..06ae9e1380 100644 --- a/firmware/rolo.c +++ b/firmware/rolo.c | |||
@@ -108,10 +108,11 @@ static void rolo_error(const char *text) | |||
108 | lcd_stop_scroll(); | 108 | lcd_stop_scroll(); |
109 | } | 109 | } |
110 | 110 | ||
111 | #if CONFIG_CPU == SH7034 | 111 | #if CONFIG_CPU == SH7034 || CONFIG_CPU == IMX31L |
112 | /* these are in assembler file "descramble.S" */ | 112 | /* these are in assembler file "descramble.S" for SH7034 */ |
113 | extern unsigned short descramble(const unsigned char* source, | 113 | extern unsigned short descramble(const unsigned char* source, |
114 | unsigned char* dest, int length); | 114 | unsigned char* dest, int length); |
115 | /* this is in firmware/target/arm/imx31/rolo_restart.S for IMX31 */ | ||
115 | extern void rolo_restart(const unsigned char* source, unsigned char* dest, | 116 | extern void rolo_restart(const unsigned char* source, unsigned char* dest, |
116 | int length); | 117 | int length); |
117 | #else | 118 | #else |
@@ -169,7 +170,7 @@ void rolo_restart(const unsigned char* source, unsigned char* dest, | |||
169 | "mov pc, r0 \n" | 170 | "mov pc, r0 \n" |
170 | ); | 171 | ); |
171 | 172 | ||
172 | #elif defined(CPU_TCC780X) || (CONFIG_CPU==IMX31L) || (CONFIG_CPU == S3C2440) | 173 | #elif defined(CPU_TCC780X) || (CONFIG_CPU == S3C2440) |
173 | /* Flush and invalidate caches */ | 174 | /* Flush and invalidate caches */ |
174 | invalidate_icache(); | 175 | invalidate_icache(); |
175 | 176 | ||
@@ -284,9 +285,13 @@ int rolo_load(const char* filename) | |||
284 | adc_close(); | 285 | adc_close(); |
285 | 286 | ||
286 | #ifdef CPU_ARM | 287 | #ifdef CPU_ARM |
287 | disable_fiq(); | 288 | /* Should do these together since some ARM version should never have |
288 | #endif | 289 | * FIQ disabled and not IRQ (imx31 errata). */ |
290 | disable_interrupt(IRQ_FIQ_STATUS); | ||
291 | #else | ||
292 | /* Some targets have a higher disable level than HIGEST_IRQ_LEVEL */ | ||
289 | set_irq_level(DISABLE_INTERRUPTS); | 293 | set_irq_level(DISABLE_INTERRUPTS); |
294 | #endif | ||
290 | 295 | ||
291 | #elif CONFIG_CPU == SH7034 | 296 | #elif CONFIG_CPU == SH7034 |
292 | /* Read file length from header and compare to real file length */ | 297 | /* Read file length from header and compare to real file length */ |