* [U-Boot] [PATCH v3] tegra2: Enable data cache
@ 2012-01-09 23:22 Simon Glass
2012-01-10 21:49 ` Stephen Warren
0 siblings, 1 reply; 2+ messages in thread
From: Simon Glass @ 2012-01-09 23:22 UTC (permalink / raw)
To: u-boot
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>
---
Changes in v2:
- Enable caches for all Tegra2 boards instead of just Nvidia ones
Changes in v3:
- Rebase against master
arch/arm/cpu/armv7/tegra2/board.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/cpu/armv7/tegra2/board.c b/arch/arm/cpu/armv7/tegra2/board.c
index 8b9e895..38497f1 100644
--- a/arch/arm/cpu/armv7/tegra2/board.c
+++ b/arch/arm/cpu/armv7/tegra2/board.c
@@ -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
--
1.7.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] [PATCH v3] tegra2: Enable data cache
2012-01-09 23:22 [U-Boot] [PATCH v3] tegra2: Enable data cache Simon Glass
@ 2012-01-10 21:49 ` Stephen Warren
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2012-01-10 21:49 UTC (permalink / raw)
To: u-boot
On 01/09/2012 04:22 PM, Simon Glass wrote:
> 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>
> ---
> Changes in v2:
> - Enable caches for all Tegra2 boards instead of just Nvidia ones
>
> Changes in v3:
> - Rebase against master
Acked-by: Stephen Warren <swarren@nvidia.com>
--
nvpublic
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-10 21:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09 23:22 [U-Boot] [PATCH v3] tegra2: Enable data cache Simon Glass
2012-01-10 21:49 ` Stephen Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox