summaryrefslogtreecommitdiffstats
path: root/firmware/rolo.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-10-19 21:32:40 +0000
committerThomas Martitz <kugel@rockbox.org>2009-10-19 21:32:40 +0000
commitee7247998a414180616abf3a15f3962494015110 (patch)
tree28ca9b74fd773d1a1145dffbe2369d771241f6e3 /firmware/rolo.c
parentdc193433921003a829091fd9fc535ed53487ab89 (diff)
downloadrockbox-ee7247998a414180616abf3a15f3962494015110.tar.gz
rockbox-ee7247998a414180616abf3a15f3962494015110.tar.bz2
rockbox-ee7247998a414180616abf3a15f3962494015110.zip
Fix rolo for AMS Sansa and simplify a few #ifdefs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23275 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/rolo.c')
-rw-r--r--firmware/rolo.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/firmware/rolo.c b/firmware/rolo.c
index 37834b3f1e..58404eecff 100644
--- a/firmware/rolo.c
+++ b/firmware/rolo.c
@@ -173,11 +173,11 @@ void rolo_restart(const unsigned char* source, unsigned char* dest,
"mov pc, r0 \n"
);
-#elif defined(CPU_TCC780X) || (CONFIG_CPU == S3C2440) || \
- (CONFIG_CPU==DM320) || defined(CPU_S5L870X)
+#elif defined(CPU_ARM)
+#ifdef HAVE_CPUCACHE_INVALIDATE
/* Flush and invalidate caches */
cpucache_invalidate();
-
+#endif
asm volatile(
"mov pc, %0 \n"
: : "r"(dest)
@@ -237,9 +237,7 @@ int rolo_load(const char* filename)
length = filesize(fd) - FIRMWARE_OFFSET_FILE_DATA;
-#if defined(CPU_COLDFIRE) || defined(CPU_PP) || (CONFIG_CPU==DM320) \
- || defined(CPU_TCC780X) || (CONFIG_CPU==IMX31L) || (CONFIG_CPU == S3C2440) \
- || (CONFIG_CPU==AS3525) || (CONFIG_CPU==JZ4732) || defined(CPU_S5L870X)
+#if CONFIG_CPU != SH7034
/* Read and save checksum */
lseek(fd, FIRMWARE_OFFSET_FILE_CRC, SEEK_SET);
if (read(fd, &file_checksum, 4) != 4) {
@@ -304,7 +302,7 @@ int rolo_load(const char* filename)
set_irq_level(DISABLE_INTERRUPTS);
#endif
-#elif CONFIG_CPU == SH7034
+#else /* CONFIG_CPU == SH7034 */
/* Read file length from header and compare to real file length */
lseek(fd, FIRMWARE_OFFSET_FILE_LENGTH, SEEK_SET);
if(read(fd, &file_length, 4) != 4) {