summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 34275d7)
raw | patch | inline | side by side (parent: 34275d7)
author | Benoît Thébaudeau <benoit.thebaudeau@advansee.com> | |
Thu, 4 Oct 2012 10:04:02 +0000 (10:04 +0000) | ||
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | |
Sat, 10 Nov 2012 11:28:22 +0000 (12:28 +0100) |
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>
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>
arch/arm/cpu/arm1136/cpu.c | patch | blob | history |
index b98e3d9face97006d5588901eecb152b2d799701..32a4c244c5748a231f0c33bb9509998aeba6ccb9 100644 (file)
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)
{
{
}
#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