summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2015-04-25 06:29:55 +0200
committerLuka Perkov <luka.perkov@sartura.hr>2015-05-05 14:32:04 +0200
commit60b75324ea6fb0a72786f3ec36c1057f39ebe2e6 (patch)
tree14103fe1613c15c74cc7b178f7c7f16c7ceb6b41
parentb81d0ea7280b2d325e7c16cce808bec035d60a08 (diff)
downloadtalos-obmc-uboot-60b75324ea6fb0a72786f3ec36c1057f39ebe2e6.tar.gz
talos-obmc-uboot-60b75324ea6fb0a72786f3ec36c1057f39ebe2e6.zip
arm: mvebu: Add d-cache invalidate before enabling the d-cache
This solves some RX problems that have been seen, when using the mvneta ethernet driver. The cache needs to be reset into a "clean" state before using it. Signed-off-by: Stefan Roese <sr@denx.de> Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com> Tested-by: Dirk Eibach <dirk.eibach@gdsys.cc>
-rw-r--r--arch/arm/mach-mvebu/cpu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c
index 8058fadb22..04681fc5a0 100644
--- a/arch/arm/mach-mvebu/cpu.c
+++ b/arch/arm/mach-mvebu/cpu.c
@@ -240,6 +240,9 @@ int cpu_eth_init(bd_t *bis)
#ifndef CONFIG_SYS_DCACHE_OFF
void enable_caches(void)
{
+ /* Avoid problem with e.g. neta ethernet driver */
+ invalidate_dcache_all();
+
/* Enable D-cache. I-cache is already enabled in start.S */
dcache_enable();
}
OpenPOWER on IntegriCloud