]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tegra2: Enable data cache
authorSimon Glass <sjg@chromium.org>
Mon, 9 Jan 2012 13:22:15 +0000 (13:22 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sun, 12 Feb 2012 09:11:22 +0000 (10:11 +0100)
This enables the data cache on Tegra2 boards.

As discussed on the list, this is better off in the Tegra2 cpu code than in a
particular vendor directory. We should be safe turning on the cache for all
Tegra2 boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/cpu/armv7/tegra2/board.c

index 8e28d08247dfb82b8e3987f73b0420cdbc2340b7..349d50e1ac4adbc1b509d0d5a7302d384a42c663 100644 (file)
@@ -141,3 +141,11 @@ void board_init_uart_f(void)
 #endif
        setup_uarts(uart_ids);
 }
+
+#ifndef CONFIG_SYS_DCACHE_OFF
+void enable_caches(void)
+{
+       /* Enable D-cache. I-cache is already enabled in start.S */
+       dcache_enable();
+}
+#endif