diff mbox series

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

Message ID 20180116162029.9258-3-Eugeniy.Paltsev@synopsys.com
State Accepted, archived
Commit b0146f9e29ca2e82262416aca65395c322a618f9
Delegated to: Alexey Brodkin
Headers show
Series [U-Boot,1/4] ARC: read pae_exist bit from MMU BCR | expand

Commit Message

Eugeniy Paltsev Jan. 16, 2018, 4:20 p.m. UTC
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@synopsys.com>
---
 arch/arc/lib/cache.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

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