diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh3/probe.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh3/probe.c | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/arch/sh/kernel/cpu/sh3/probe.c b/arch/sh/kernel/cpu/sh3/probe.c index 647623b22edc..bf579e061e09 100644 --- a/arch/sh/kernel/cpu/sh3/probe.c +++ b/arch/sh/kernel/cpu/sh3/probe.c | |||
@@ -50,44 +50,47 @@ int __init detect_cpu_and_cache_system(void) | |||
50 | 50 | ||
51 | back_to_P1(); | 51 | back_to_P1(); |
52 | 52 | ||
53 | current_cpu_data.dcache.ways = 4; | 53 | boot_cpu_data.dcache.ways = 4; |
54 | current_cpu_data.dcache.entry_shift = 4; | 54 | boot_cpu_data.dcache.entry_shift = 4; |
55 | current_cpu_data.dcache.linesz = L1_CACHE_BYTES; | 55 | boot_cpu_data.dcache.linesz = L1_CACHE_BYTES; |
56 | current_cpu_data.dcache.flags = 0; | 56 | boot_cpu_data.dcache.flags = 0; |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * 7709A/7729 has 16K cache (256-entry), while 7702 has only | 59 | * 7709A/7729 has 16K cache (256-entry), while 7702 has only |
60 | * 2K(direct) 7702 is not supported (yet) | 60 | * 2K(direct) 7702 is not supported (yet) |
61 | */ | 61 | */ |
62 | if (data0 == data1 && data2 == data3) { /* Shadow */ | 62 | if (data0 == data1 && data2 == data3) { /* Shadow */ |
63 | current_cpu_data.dcache.way_incr = (1 << 11); | 63 | boot_cpu_data.dcache.way_incr = (1 << 11); |
64 | current_cpu_data.dcache.entry_mask = 0x7f0; | 64 | boot_cpu_data.dcache.entry_mask = 0x7f0; |
65 | current_cpu_data.dcache.sets = 128; | 65 | boot_cpu_data.dcache.sets = 128; |
66 | current_cpu_data.type = CPU_SH7708; | 66 | boot_cpu_data.type = CPU_SH7708; |
67 | 67 | ||
68 | current_cpu_data.flags |= CPU_HAS_MMU_PAGE_ASSOC; | 68 | boot_cpu_data.flags |= CPU_HAS_MMU_PAGE_ASSOC; |
69 | } else { /* 7709A or 7729 */ | 69 | } else { /* 7709A or 7729 */ |
70 | current_cpu_data.dcache.way_incr = (1 << 12); | 70 | boot_cpu_data.dcache.way_incr = (1 << 12); |
71 | current_cpu_data.dcache.entry_mask = 0xff0; | 71 | boot_cpu_data.dcache.entry_mask = 0xff0; |
72 | current_cpu_data.dcache.sets = 256; | 72 | boot_cpu_data.dcache.sets = 256; |
73 | current_cpu_data.type = CPU_SH7729; | 73 | boot_cpu_data.type = CPU_SH7729; |
74 | 74 | ||
75 | #if defined(CONFIG_CPU_SUBTYPE_SH7706) | 75 | #if defined(CONFIG_CPU_SUBTYPE_SH7706) |
76 | current_cpu_data.type = CPU_SH7706; | 76 | boot_cpu_data.type = CPU_SH7706; |
77 | #endif | 77 | #endif |
78 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) | 78 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) |
79 | current_cpu_data.type = CPU_SH7710; | 79 | boot_cpu_data.type = CPU_SH7710; |
80 | #endif | 80 | #endif |
81 | #if defined(CONFIG_CPU_SUBTYPE_SH7712) | 81 | #if defined(CONFIG_CPU_SUBTYPE_SH7712) |
82 | current_cpu_data.type = CPU_SH7712; | 82 | boot_cpu_data.type = CPU_SH7712; |
83 | #endif | ||
84 | #if defined(CONFIG_CPU_SUBTYPE_SH7720) | ||
85 | boot_cpu_data.type = CPU_SH7720; | ||
83 | #endif | 86 | #endif |
84 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | 87 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) |
85 | current_cpu_data.type = CPU_SH7705; | 88 | boot_cpu_data.type = CPU_SH7705; |
86 | 89 | ||
87 | #if defined(CONFIG_SH7705_CACHE_32KB) | 90 | #if defined(CONFIG_SH7705_CACHE_32KB) |
88 | current_cpu_data.dcache.way_incr = (1 << 13); | 91 | boot_cpu_data.dcache.way_incr = (1 << 13); |
89 | current_cpu_data.dcache.entry_mask = 0x1ff0; | 92 | boot_cpu_data.dcache.entry_mask = 0x1ff0; |
90 | current_cpu_data.dcache.sets = 512; | 93 | boot_cpu_data.dcache.sets = 512; |
91 | ctrl_outl(CCR_CACHE_32KB, CCR3); | 94 | ctrl_outl(CCR_CACHE_32KB, CCR3); |
92 | #else | 95 | #else |
93 | ctrl_outl(CCR_CACHE_16KB, CCR3); | 96 | ctrl_outl(CCR_CACHE_16KB, CCR3); |
@@ -98,9 +101,8 @@ int __init detect_cpu_and_cache_system(void) | |||
98 | /* | 101 | /* |
99 | * SH-3 doesn't have separate caches | 102 | * SH-3 doesn't have separate caches |
100 | */ | 103 | */ |
101 | current_cpu_data.dcache.flags |= SH_CACHE_COMBINED; | 104 | boot_cpu_data.dcache.flags |= SH_CACHE_COMBINED; |
102 | current_cpu_data.icache = current_cpu_data.dcache; | 105 | boot_cpu_data.icache = boot_cpu_data.dcache; |
103 | 106 | ||
104 | return 0; | 107 | return 0; |
105 | } | 108 | } |
106 | |||