From 99bf01a5f0566f3d823840f4ab9ec92813d5a758 Mon Sep 17 00:00:00 2001
From: Valentine Barshak <valentine.barshak@cogentembedded.com>
Date: Thu, 29 Nov 2018 23:21:44 +0300
Subject: [PATCH] arm: cpu: armv8: Disable dcache

This disables dcache to workaround the instability
issues on the R-Car Gen3 boards.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
---
 arch/arm/cpu/armv8/cache_v8.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index 0384051..03a74c0 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -467,8 +467,12 @@ void dcache_enable(void)
 		__asm_invalidate_tlb_all();
 		mmu_setup();
 	}
-
+	/* Workaround stability issues on R-Car Gen3
+	 * boards * by not enabling dcache
+	 */
+#if 0
 	set_sctlr(get_sctlr() | CR_C);
+#endif
 }
 
 void dcache_disable(void)
-- 
2.7.4

