2 * arch/sh/kernel/cpu/sh2/probe.c
4 * CPU Subtype Probing for SH-2.
6 * Copyright (C) 2002 Paul Mundt
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
14 #include <linux/init.h>
15 #include <asm/processor.h>
16 #include <asm/cache.h>
18 int __init
detect_cpu_and_cache_system(void)
20 #if defined(CONFIG_CPU_SUBTYPE_SH7604)
21 current_cpu_data
.type
= CPU_SH7604
;
22 current_cpu_data
.dcache
.ways
= 4;
23 current_cpu_data
.dcache
.way_incr
= (1<<10);
24 current_cpu_data
.dcache
.sets
= 64;
25 current_cpu_data
.dcache
.entry_shift
= 4;
26 current_cpu_data
.dcache
.linesz
= L1_CACHE_BYTES
;
27 current_cpu_data
.dcache
.flags
= 0;
28 #elif defined(CONFIG_CPU_SUBTYPE_SH7619)
29 current_cpu_data
.type
= CPU_SH7619
;
30 current_cpu_data
.dcache
.ways
= 4;
31 current_cpu_data
.dcache
.way_incr
= (1<<12);
32 current_cpu_data
.dcache
.sets
= 256;
33 current_cpu_data
.dcache
.entry_shift
= 4;
34 current_cpu_data
.dcache
.linesz
= L1_CACHE_BYTES
;
35 current_cpu_data
.dcache
.flags
= 0;
38 * SH-2 doesn't have separate caches
40 current_cpu_data
.dcache
.flags
|= SH_CACHE_COMBINED
;
41 current_cpu_data
.icache
= current_cpu_data
.dcache
;