summaryrefslogtreecommitdiffstats
path: root/firmware/rolo.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-05-08 12:09:14 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-05-08 12:09:14 +0000
commit6dd6ea74af4ebfa1112f2e606db67357c0e2632f (patch)
tree5506268620a9dfe49923a4e6e5c957bedcd6fabe /firmware/rolo.c
parente616092fd566e9d0455727ef32a2879f15ac80da (diff)
downloadrockbox-6dd6ea74af4ebfa1112f2e606db67357c0e2632f.tar.gz
rockbox-6dd6ea74af4ebfa1112f2e606db67357c0e2632f.tar.bz2
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.c15
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)
lcd_stop_scroll();
}
-#if CONFIG_CPU == SH7034
-/* these are in assembler file "descramble.S" */
+#if CONFIG_CPU == SH7034 || CONFIG_CPU == IMX31L
+/* these are in assembler file "descramble.S" for SH7034 */
extern unsigned short descramble(const unsigned char* source,
unsigned char* dest, int length);
+/* this is in firmware/target/arm/imx31/rolo_restart.S for IMX31 */
extern void rolo_restart(const unsigned char* source, unsigned char* dest,
int length);
#else
@@ -169,7 +170,7 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
"mov pc, r0 \n"
);
-#elif defined(CPU_TCC780X) || (CONFIG_CPU==IMX31L) || (CONFIG_CPU == S3C2440)
+#elif defined(CPU_TCC780X) || (CONFIG_CPU == S3C2440)
/* Flush and invalidate caches */
invalidate_icache();
@@ -284,9 +285,13 @@ int rolo_load(const char* filename)
adc_close();
#ifdef CPU_ARM
- disable_fiq();
-#endif
+ /* Should do these together since some ARM version should never have
+ * FIQ disabled and not IRQ (imx31 errata). */
+ disable_interrupt(IRQ_FIQ_STATUS);
+#else
+ /* Some targets have a higher disable level than HIGEST_IRQ_LEVEL */
set_irq_level(DISABLE_INTERRUPTS);
+#endif
#elif CONFIG_CPU == SH7034
/* Read file length from header and compare to real file length */