summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@libc.org>2016-03-23 02:59:40 +0000
committerRich Felker <dalias@libc.org>2016-04-11 22:55:47 +0000
commit20c0fb7ecf13b5f70978ea90196588dcb80bc20a (patch)
treee4f9caf7c1e02dab906c2f3507980eda780556ff
parenteaae7d96624a42d29e680d56dbf49a1659d376f5 (diff)
downloadlinux-sh-20c0fb7ecf13b5f70978ea90196588dcb80bc20a.tar.gz
sh: report actual J2 cache characteristics in cpu_probe
This is not ready for upstream because it has hard-coded cache configuration rather than using device tree.
-rw-r--r--arch/sh/kernel/cpu/sh2/probe.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/sh/kernel/cpu/sh2/probe.c b/arch/sh/kernel/cpu/sh2/probe.c
index e23505344158..19681c813e8a 100644
--- a/arch/sh/kernel/cpu/sh2/probe.c
+++ b/arch/sh/kernel/cpu/sh2/probe.c
@@ -26,14 +26,20 @@ void cpu_probe(void)
#endif
#if defined(CONFIG_CPU_J2)
- boot_cpu_data.type = CPU_J2;
- boot_cpu_data.dcache.sets = 1; /* FIXME */
+ boot_cpu_data.type = CPU_J2;
+ boot_cpu_data.dcache.ways = 1;
+ boot_cpu_data.dcache.sets = 256;
+ boot_cpu_data.dcache.entry_shift = 5;
+ boot_cpu_data.dcache.linesz = 32;
+ boot_cpu_data.dcache.flags = 0;
+
boot_cpu_data.flags |= CPU_HAS_CAS_L;
-#endif
+#else
/*
* SH-2 doesn't have separate caches
*/
boot_cpu_data.dcache.flags |= SH_CACHE_COMBINED;
+#endif
boot_cpu_data.icache = boot_cpu_data.dcache;
boot_cpu_data.family = CPU_FAMILY_SH2;
}