aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/mm/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arc/mm/cache.c')
-rw-r--r--arch/arc/mm/cache.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
index 97dddbefb86a..2b96cfc3be75 100644
--- a/arch/arc/mm/cache.c
+++ b/arch/arc/mm/cache.c
@@ -22,8 +22,8 @@
22#include <asm/setup.h> 22#include <asm/setup.h>
23 23
24static int l2_line_sz; 24static int l2_line_sz;
25int ioc_exists; 25static int ioc_exists;
26volatile int slc_enable = 1, ioc_enable = 1; 26int slc_enable = 1, ioc_enable = 1;
27unsigned long perip_base = ARC_UNCACHED_ADDR_SPACE; /* legacy value for boot */ 27unsigned long perip_base = ARC_UNCACHED_ADDR_SPACE; /* legacy value for boot */
28unsigned long perip_end = 0xFFFFFFFF; /* legacy value */ 28unsigned long perip_end = 0xFFFFFFFF; /* legacy value */
29 29
@@ -53,18 +53,15 @@ char *arc_cache_mumbojumbo(int c, char *buf, int len)
53 PR_CACHE(&cpuinfo_arc700[c].icache, CONFIG_ARC_HAS_ICACHE, "I-Cache"); 53 PR_CACHE(&cpuinfo_arc700[c].icache, CONFIG_ARC_HAS_ICACHE, "I-Cache");
54 PR_CACHE(&cpuinfo_arc700[c].dcache, CONFIG_ARC_HAS_DCACHE, "D-Cache"); 54 PR_CACHE(&cpuinfo_arc700[c].dcache, CONFIG_ARC_HAS_DCACHE, "D-Cache");
55 55
56 if (!is_isa_arcv2())
57 return buf;
58
59 p = &cpuinfo_arc700[c].slc; 56 p = &cpuinfo_arc700[c].slc;
60 if (p->ver) 57 if (p->ver)
61 n += scnprintf(buf + n, len - n, 58 n += scnprintf(buf + n, len - n,
62 "SLC\t\t: %uK, %uB Line%s\n", 59 "SLC\t\t: %uK, %uB Line%s\n",
63 p->sz_k, p->line_len, IS_USED_RUN(slc_enable)); 60 p->sz_k, p->line_len, IS_USED_RUN(slc_enable));
64 61
65 if (ioc_exists) 62 n += scnprintf(buf + n, len - n, "Peripherals\t: %#lx%s%s\n",
66 n += scnprintf(buf + n, len - n, "IOC\t\t:%s\n", 63 perip_base,
67 IS_DISABLED_RUN(ioc_enable)); 64 IS_AVAIL3(ioc_exists, ioc_enable, ", IO-Coherency "));
68 65
69 return buf; 66 return buf;
70} 67}
@@ -113,8 +110,10 @@ static void read_decode_cache_bcr_arcv2(int cpu)
113 } 110 }
114 111
115 READ_BCR(ARC_REG_CLUSTER_BCR, cbcr); 112 READ_BCR(ARC_REG_CLUSTER_BCR, cbcr);
116 if (cbcr.c && ioc_enable) 113 if (cbcr.c)
117 ioc_exists = 1; 114 ioc_exists = 1;
115 else
116 ioc_enable = 0;
118 117
119 /* HS 2.0 didn't have AUX_VOL */ 118 /* HS 2.0 didn't have AUX_VOL */
120 if (cpuinfo_arc700[cpu].core.family > 0x51) { 119 if (cpuinfo_arc700[cpu].core.family > 0x51) {
@@ -1002,7 +1001,7 @@ void arc_cache_init(void)
1002 read_aux_reg(ARC_REG_SLC_CTRL) | SLC_CTRL_DISABLE); 1001 read_aux_reg(ARC_REG_SLC_CTRL) | SLC_CTRL_DISABLE);
1003 } 1002 }
1004 1003
1005 if (is_isa_arcv2() && ioc_exists) { 1004 if (is_isa_arcv2() && ioc_enable) {
1006 /* IO coherency base - 0x8z */ 1005 /* IO coherency base - 0x8z */
1007 write_aux_reg(ARC_REG_IO_COH_AP0_BASE, 0x80000); 1006 write_aux_reg(ARC_REG_IO_COH_AP0_BASE, 0x80000);
1008 /* IO coherency aperture size - 512Mb: 0x8z-0xAz */ 1007 /* IO coherency aperture size - 512Mb: 0x8z-0xAz */