From 4ab333b765db5cd00b297b4c0e3cd3af5fe320fc Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 21 Sep 2014 13:57:40 +0200 Subject: arm: socfpga: Move cache_enable to CPU code Move icache_enable() and dcache_enable() function calls from board code into the CPU code and into the enable_caches() function. This is how the cache enabling code was designed to work. Signed-off-by: Marek Vasut Cc: Dinh Nguyen Cc: Pavel Machek Cc: Marek Vasut Cc: Tom Rini Cc: Albert Aribaud Cc: Wolfgang Denk Acked-by: Pavel Machek --- arch/arm/cpu/armv7/socfpga/misc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/arm/cpu/armv7/socfpga') diff --git a/arch/arm/cpu/armv7/socfpga/misc.c b/arch/arm/cpu/armv7/socfpga/misc.c index 76186c511b..7f9d7f0133 100644 --- a/arch/arm/cpu/armv7/socfpga/misc.c +++ b/arch/arm/cpu/armv7/socfpga/misc.c @@ -33,6 +33,16 @@ int dram_init(void) return 0; } +void enable_caches(void) +{ +#ifndef CONFIG_SYS_ICACHE_OFF + icache_enable(); +#endif +#ifndef CONFIG_SYS_DCACHE_OFF + dcache_enable(); +#endif +} + /* * DesignWare Ethernet initialization */ -- cgit v1.2.1