diff options
Diffstat (limited to 'firmware/target/arm/s5l8702/system-s5l8702.c')
-rw-r--r-- | firmware/target/arm/s5l8702/system-s5l8702.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/firmware/target/arm/s5l8702/system-s5l8702.c b/firmware/target/arm/s5l8702/system-s5l8702.c index 3e84e5cf54..6b20f44acb 100644 --- a/firmware/target/arm/s5l8702/system-s5l8702.c +++ b/firmware/target/arm/s5l8702/system-s5l8702.c | |||
@@ -168,7 +168,7 @@ void irq_handler(void) | |||
168 | irqvector[current_irq](); | 168 | irqvector[current_irq](); |
169 | VIC0ADDRESS = NULL; | 169 | VIC0ADDRESS = NULL; |
170 | VIC1ADDRESS = NULL; | 170 | VIC1ADDRESS = NULL; |
171 | 171 | ||
172 | asm volatile( "add sp, sp, #8 \n" /* Cleanup stack */ | 172 | asm volatile( "add sp, sp, #8 \n" /* Cleanup stack */ |
173 | "ldmfd sp!, {r0-r7, ip, lr} \n" /* Restore context */ | 173 | "ldmfd sp!, {r0-r7, ip, lr} \n" /* Restore context */ |
174 | "subs pc, lr, #4 \n"); /* Return from IRQ */ | 174 | "subs pc, lr, #4 \n"); /* Return from IRQ */ |
@@ -258,3 +258,22 @@ void set_cpu_frequency(long frequency) | |||
258 | cpu_frequency = frequency; | 258 | cpu_frequency = frequency; |
259 | } | 259 | } |
260 | #endif | 260 | #endif |
261 | |||
262 | static void set_page_tables(void) | ||
263 | { | ||
264 | /* map RAM to itself and enable caching for it */ | ||
265 | map_section(0, 0, 0x380, CACHE_ALL); | ||
266 | |||
267 | /* disable caching for I/O area */ | ||
268 | map_section(0x38000000, 0x38000000, 0x80, CACHE_NONE); | ||
269 | |||
270 | /* map RAM uncached addresses */ | ||
271 | map_section(0, S5L8702_UNCACHED_ADDR(0x0), 0x380, CACHE_NONE); | ||
272 | } | ||
273 | |||
274 | void memory_init(void) | ||
275 | { | ||
276 | ttb_init(); | ||
277 | set_page_tables(); | ||
278 | enable_mmu(); | ||
279 | } | ||