summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@libc.org>2016-03-23 02:59:40 +0000
committerRich Felker <dalias@libc.org>2016-03-30 00:49:01 +0000
commit26c8d482f0e5623818c6ee17088f8197d034efc9 (patch)
tree3c4e9604d8c5e16231ae326f10192a9891bdf1b3
parentdd96ec400da665b6cd78e8456b988f8013ecf131 (diff)
downloadlinux-sh-26c8d482f0e5623818c6ee17088f8197d034efc9.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;
}