diff options
Diffstat (limited to 'firmware/system.c')
-rw-r--r-- | firmware/system.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/firmware/system.c b/firmware/system.c index 96d5f96602..207a14727f 100644 --- a/firmware/system.c +++ b/firmware/system.c | |||
@@ -126,34 +126,31 @@ void system_init(void) { | |||
126 | } | 126 | } |
127 | 127 | ||
128 | #endif | 128 | #endif |
129 | #if defined(IRIVER_H100_SERIES) && !defined(SIMULATOR) | 129 | |
130 | bool detect_flashed_rockbox(void) | 130 | bool detect_flashed_rockbox(void) |
131 | { | 131 | { |
132 | #ifdef HAVE_FLASHED_ROCKBOX | ||
132 | struct flash_header hdr; | 133 | struct flash_header hdr; |
133 | uint8_t *src = (uint8_t *)FLASH_ENTRYPOINT; | 134 | uint8_t *src = (uint8_t *)FLASH_ENTRYPOINT; |
134 | 135 | ||
135 | # ifndef BOOTLOADER | 136 | #ifndef BOOTLOADER |
136 | int oldmode; | 137 | int oldmode = system_memory_guard(MEMGUARD_NONE); |
137 | oldmode = system_memory_guard(MEMGUARD_NONE); | 138 | #endif |
138 | # endif | ||
139 | 139 | ||
140 | memcpy(&hdr, src, sizeof(struct flash_header)); | 140 | memcpy(&hdr, src, sizeof(struct flash_header)); |
141 | 141 | ||
142 | # ifndef BOOTLOADER | 142 | #ifndef BOOTLOADER |
143 | system_memory_guard(oldmode); | 143 | system_memory_guard(oldmode); |
144 | # endif | 144 | #endif |
145 | 145 | ||
146 | if (hdr.magic != FLASH_MAGIC) | 146 | if (hdr.magic != FLASH_MAGIC) |
147 | return false; | 147 | return false; |
148 | 148 | ||
149 | return true; | 149 | return true; |
150 | } | ||
151 | #else | 150 | #else |
152 | bool detect_flashed_rockbox(void) | ||
153 | { | ||
154 | return false; | 151 | return false; |
152 | #endif /* HAVE_FLASHED_ROCKBOX */ | ||
155 | } | 153 | } |
156 | #endif | ||
157 | 154 | ||
158 | #if CONFIG_CPU == TCC730 | 155 | #if CONFIG_CPU == TCC730 |
159 | 156 | ||