.. | .. |
---|
12 | 12 | #include <asm/bcache.h> |
---|
13 | 13 | #include <asm/cacheops.h> |
---|
14 | 14 | #include <asm/page.h> |
---|
15 | | -#include <asm/pgtable.h> |
---|
16 | 15 | #include <asm/mmu_context.h> |
---|
17 | 16 | #include <asm/r4kcache.h> |
---|
18 | 17 | #include <asm/mips-cps.h> |
---|
.. | .. |
---|
147 | 146 | return 1; |
---|
148 | 147 | } |
---|
149 | 148 | |
---|
150 | | -static int __init mips_sc_probe_cm3(void) |
---|
| 149 | +static int mips_sc_probe_cm3(void) |
---|
151 | 150 | { |
---|
152 | 151 | struct cpuinfo_mips *c = ¤t_cpu_data; |
---|
153 | 152 | unsigned long cfg = read_gcr_l2_config(); |
---|
.. | .. |
---|
181 | 180 | return 0; |
---|
182 | 181 | } |
---|
183 | 182 | |
---|
184 | | -static inline int __init mips_sc_probe(void) |
---|
| 183 | +static inline int mips_sc_probe(void) |
---|
185 | 184 | { |
---|
186 | 185 | struct cpuinfo_mips *c = ¤t_cpu_data; |
---|
187 | 186 | unsigned int config1, config2; |
---|
.. | .. |
---|
194 | 193 | return mips_sc_probe_cm3(); |
---|
195 | 194 | |
---|
196 | 195 | /* Ignore anything but MIPSxx processors */ |
---|
197 | | - if (!(c->isa_level & (MIPS_CPU_ISA_M32R1 | MIPS_CPU_ISA_M32R2 | |
---|
198 | | - MIPS_CPU_ISA_M32R6 | MIPS_CPU_ISA_M64R1 | |
---|
199 | | - MIPS_CPU_ISA_M64R2 | MIPS_CPU_ISA_M64R6))) |
---|
| 196 | + if (!(c->isa_level & (MIPS_CPU_ISA_M32R1 | MIPS_CPU_ISA_M64R1 | |
---|
| 197 | + MIPS_CPU_ISA_M32R2 | MIPS_CPU_ISA_M64R2 | |
---|
| 198 | + MIPS_CPU_ISA_M32R5 | MIPS_CPU_ISA_M64R5 | |
---|
| 199 | + MIPS_CPU_ISA_M32R6 | MIPS_CPU_ISA_M64R6))) |
---|
200 | 200 | return 0; |
---|
201 | 201 | |
---|
202 | 202 | /* Does this MIPS32/MIPS64 CPU have a config2 register? */ |
---|
.. | .. |
---|
221 | 221 | else |
---|
222 | 222 | return 0; |
---|
223 | 223 | |
---|
224 | | - /* |
---|
225 | | - * According to config2 it would be 5-ways, but that is contradicted |
---|
226 | | - * by all documentation. |
---|
227 | | - */ |
---|
228 | | - if (current_cpu_type() == CPU_JZRISC && |
---|
229 | | - mips_machtype == MACH_INGENIC_JZ4770) |
---|
230 | | - c->scache.ways = 4; |
---|
| 224 | + if (current_cpu_type() == CPU_XBURST) { |
---|
| 225 | + switch (mips_machtype) { |
---|
| 226 | + /* |
---|
| 227 | + * According to config2 it would be 5-ways, but that is |
---|
| 228 | + * contradicted by all documentation. |
---|
| 229 | + */ |
---|
| 230 | + case MACH_INGENIC_JZ4770: |
---|
| 231 | + case MACH_INGENIC_JZ4775: |
---|
| 232 | + c->scache.ways = 4; |
---|
| 233 | + break; |
---|
| 234 | + |
---|
| 235 | + /* |
---|
| 236 | + * According to config2 it would be 5-ways and 512-sets, |
---|
| 237 | + * but that is contradicted by all documentation. |
---|
| 238 | + */ |
---|
| 239 | + case MACH_INGENIC_X1000: |
---|
| 240 | + case MACH_INGENIC_X1000E: |
---|
| 241 | + c->scache.sets = 256; |
---|
| 242 | + c->scache.ways = 4; |
---|
| 243 | + break; |
---|
| 244 | + } |
---|
| 245 | + } |
---|
231 | 246 | |
---|
232 | 247 | c->scache.waysize = c->scache.sets * c->scache.linesz; |
---|
233 | 248 | c->scache.waybit = __ffs(c->scache.waysize); |
---|