Skip to content
Snippets Groups Projects
Commit 7a90a1f2 authored by Stefan Agner's avatar Stefan Agner Committed by Tom Rini
Browse files

ARM: vf610: Enable caches


Enables caches which provides a rather huge speedup of the boot loader.
Also mark the on-chip RAM as cachable since this is the area U-Boot runs
from.

Signed-off-by: default avatarSanchayan Maity <maitysanchayan@gmail.com>
parent 1db503c4
No related branches found
No related tags found
No related merge requests found
......@@ -342,3 +342,19 @@ int get_clocks(void)
#endif
return 0;
}
#ifndef CONFIG_SYS_DCACHE_OFF
void enable_caches(void)
{
#if defined(CONFIG_SYS_ARM_CACHE_WRITETHROUGH)
enum dcache_option option = DCACHE_WRITETHROUGH;
#else
enum dcache_option option = DCACHE_WRITEBACK;
#endif
dcache_enable();
icache_enable();
/* Enable caching on OCRAM */
mmu_set_region_dcache_behaviour(IRAM_BASE_ADDR, IRAM_SIZE, option);
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment