Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * arch/sh/kernel/cpu/sh2/probe.c |
| 3 | * |
| 4 | * CPU Subtype Probing for SH-2. |
| 5 | * |
| 6 | * Copyright (C) 2002 Paul Mundt |
| 7 | * |
| 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 |
| 10 | * for more details. |
| 11 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <linux/init.h> |
| 13 | #include <asm/processor.h> |
| 14 | #include <asm/cache.h> |
| 15 | |
| 16 | int __init detect_cpu_and_cache_system(void) |
| 17 | { |
Paul Mundt | b9601c5 | 2007-06-08 11:55:28 +0900 | [diff] [blame] | 18 | #if defined(CONFIG_CPU_SUBTYPE_SH7619) |
Paul Mundt | cb7af21 | 2007-09-27 18:18:39 +0900 | [diff] [blame] | 19 | boot_cpu_data.type = CPU_SH7619; |
| 20 | boot_cpu_data.dcache.ways = 4; |
| 21 | boot_cpu_data.dcache.way_incr = (1<<12); |
| 22 | boot_cpu_data.dcache.sets = 256; |
| 23 | boot_cpu_data.dcache.entry_shift = 4; |
| 24 | boot_cpu_data.dcache.linesz = L1_CACHE_BYTES; |
| 25 | boot_cpu_data.dcache.flags = 0; |
Yoshinori Sato | 9d4436a | 2006-11-05 15:40:13 +0900 | [diff] [blame] | 26 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | /* |
| 28 | * SH-2 doesn't have separate caches |
| 29 | */ |
Paul Mundt | cb7af21 | 2007-09-27 18:18:39 +0900 | [diff] [blame] | 30 | boot_cpu_data.dcache.flags |= SH_CACHE_COMBINED; |
| 31 | boot_cpu_data.icache = boot_cpu_data.dcache; |
Paul Mundt | e82da21 | 2009-08-15 10:48:13 +0900 | [diff] [blame] | 32 | boot_cpu_data.family = CPU_FAMILY_SH2; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | |
| 34 | return 0; |
| 35 | } |
| 36 | |