[U-Boot] [PATCH 3/4] ARC: CACHE: disable IOC by default

Eugeniy Paltsev Eugeniy.Paltsev at synopsys.com
Tue Jan 16 16:20:28 UTC 2018


Disable IOC by default with option to enable it.
We don't want to enable IOC in u-boot by default as we want
keep IOC HW at same state as after reset when we launching linux.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev at synopsys.com>
---
 arch/arc/lib/cache.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arc/lib/cache.c b/arch/arc/lib/cache.c
index a6bbe3c..d17948d 100644
--- a/arch/arc/lib/cache.c
+++ b/arch/arc/lib/cache.c
@@ -48,6 +48,9 @@ bool slc_exists __section(".data") = false;
 bool ioc_exists __section(".data") = false;
 bool pae_exists __section(".data") = false;
 
+/* To force enable IOC set ioc_enable to 'true' */
+bool ioc_enable __section(".data") = false;
+
 void read_decode_mmu_bcr(void)
 {
 	/* TODO: should we compare mmu version from BCR and from CONFIG? */
@@ -200,7 +203,7 @@ static void read_decode_cache_bcr_arcv2(void)
 	} cbcr;
 
 	cbcr.word = read_aux_reg(ARC_BCR_CLUSTER);
-	if (cbcr.fields.c)
+	if (cbcr.fields.c && ioc_enable)
 		ioc_exists = true;
 }
 #endif
-- 
2.9.3



More information about the U-Boot mailing list