enable_caches() did not enable icache if CONFIG_SYS_ICACHE_OFF was not defined but CONFIG_SYS_DCACHE_OFF was.
Signed-off-by: Benoît Thébaudeau <benoit.thebaud...@advansee.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> --- This patch supersedes http://patchwork.ozlabs.org/patch/177263/ . Changes for v2: - Move enable_caches() outside of the main #if in order to fix this icache issue rather than doing only #if cosmetic cleanup. .../arch/arm/cpu/arm1136/cpu.c | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git u-boot-arm-1dfc916.orig/arch/arm/cpu/arm1136/cpu.c u-boot-arm-1dfc916/arch/arm/cpu/arm1136/cpu.c index b98e3d9..32a4c24 100644 --- u-boot-arm-1dfc916.orig/arch/arm/cpu/arm1136/cpu.c +++ u-boot-arm-1dfc916/arch/arm/cpu/arm1136/cpu.c @@ -141,16 +141,6 @@ void flush_cache(unsigned long start, unsigned long size) flush_dcache_range(start, start + size); } -void enable_caches(void) -{ -#ifndef CONFIG_SYS_ICACHE_OFF - icache_enable(); -#endif -#ifndef CONFIG_SYS_DCACHE_OFF - dcache_enable(); -#endif -} - #else /* #ifndef CONFIG_SYS_DCACHE_OFF */ void invalidate_dcache_all(void) { @@ -172,3 +162,15 @@ void flush_cache(unsigned long start, unsigned long size) { } #endif /* #ifndef CONFIG_SYS_DCACHE_OFF */ + +#if !defined(CONFIG_SYS_ICACHE_OFF) || !defined(CONFIG_SYS_DCACHE_OFF) +void enable_caches(void) +{ +#ifndef CONFIG_SYS_ICACHE_OFF + icache_enable(); +#endif +#ifndef CONFIG_SYS_DCACHE_OFF + dcache_enable(); +#endif +} +#endif _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot