summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/arm1136
diff options
context:
space:
mode:
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>2012-10-04 10:04:02 +0000
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-11-10 12:28:22 +0100
commitccfa398547ce0b579f2e7874e78948246c739237 (patch)
tree3b5ed5e64cae25ade6c046993038318a83004903 /arch/arm/cpu/arm1136
parent34275d70fec6cc369a931090ebb686bc213bb80d (diff)
downloadblackbird-obmc-uboot-ccfa398547ce0b579f2e7874e78948246c739237.tar.gz
blackbird-obmc-uboot-ccfa398547ce0b579f2e7874e78948246c739237.zip
arm1136: Fix enable_caches()
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.thebaudeau@advansee.com> Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Diffstat (limited to 'arch/arm/cpu/arm1136')
-rw-r--r--arch/arm/cpu/arm1136/cpu.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/arm/cpu/arm1136/cpu.c b/arch/arm/cpu/arm1136/cpu.c
index b98e3d9fac..32a4c244c5 100644
--- a/arch/arm/cpu/arm1136/cpu.c
+++ b/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
OpenPOWER on IntegriCloud