summaryrefslogtreecommitdiff
path: root/firmware/system.c
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2006-08-05 20:19:10 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2006-08-05 20:19:10 +0000
commit954b73265404075ec4d379ddea14e626113a8677 (patch)
tree5c6ff0056ebd118aadb896856e7679a41c595cba /firmware/system.c
parent85ba65d2a3fa3d10799efadbe3a33f026bf354df (diff)
Initial support and use for EEPROM memory on H120 & H140 players when
Rockbox firmware has been flashed over original firmware (not yet possible to do). Dircache & tagcache serialization for fast bootup without the need to scan disk when Rockbox is in flash. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10464 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/system.c')
-rw-r--r--firmware/system.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/firmware/system.c b/firmware/system.c
index 1874c0480e..bb09dbcd59 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -24,6 +24,8 @@
#include "system.h"
#include "kernel.h"
#include "timer.h"
+#include "inttypes.h"
+#include "string.h"
#ifndef SIMULATOR
long cpu_frequency = CPU_FREQ;
@@ -76,6 +78,25 @@ void cpu_idle_mode(bool on_off)
#endif
+#if defined(IRIVER_H100_SERIES) && !defined(SIMULATOR)
+bool detect_flashed_rockbox(void)
+{
+ struct flash_header hdr;
+ uint8_t *src = (uint8_t *)FLASH_ENTRYPOINT;
+
+ memcpy(&hdr, src, sizeof(struct flash_header));
+ if (hdr.magic != FLASH_MAGIC)
+ return false;
+
+ return true;
+}
+#else
+bool detect_flashed_rockbox(void)
+{
+ return false;
+}
+#endif
+
#if CONFIG_CPU == TCC730
void* volatile interrupt_vector[16] __attribute__ ((section(".idata")));