From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 14 Apr 2015 12:46:54 +0200 Subject: [U-Boot] [PATCH v2 12/13] arm: mvebu: Add d-cache invalidate before enabling the d-cache In-Reply-To: <1429008415-27458-1-git-send-email-sr@denx.de> References: <1429008415-27458-1-git-send-email-sr@denx.de> Message-ID: <1429008415-27458-13-git-send-email-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v2: None arch/arm/mach-mvebu/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-mvebu/cpu.c b/arch/arm/mach-mvebu/cpu.c index 8058fad..04681fc 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(); } -- 2.3.5