]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mvebu: Add d-cache invalidate before enabling the d-cache
authorStefan Roese <sr@denx.de>
Sat, 25 Apr 2015 04:29:55 +0000 (06:29 +0200)
committerLuka Perkov <luka.perkov@sartura.hr>
Tue, 5 May 2015 12:32:04 +0000 (14:32 +0200)
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>
arch/arm/mach-mvebu/cpu.c

index 8058fadb22baa1cb52f2744ba63b4d91615078df..04681fc5a0177db94220805653ff4d5b1e7920dc 100644 (file)
@@ -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();
 }