Lines Matching refs:c
69 struct cpuinfo_mips *c = ¤t_cpu_data; in check_wait() local
72 switch (c->cputype) { in check_wait()
175 static inline void cpu_probe_legacy(struct cpuinfo_mips *c) in cpu_probe_legacy() argument
177 switch (c->processor_id & 0xff00) { in cpu_probe_legacy()
179 c->cputype = CPU_R2000; in cpu_probe_legacy()
180 c->isa_level = MIPS_CPU_ISA_I; in cpu_probe_legacy()
181 c->options = MIPS_CPU_TLB | MIPS_CPU_NOFPUEX; in cpu_probe_legacy()
183 c->options |= MIPS_CPU_FPU; in cpu_probe_legacy()
184 c->tlbsize = 64; in cpu_probe_legacy()
187 if ((c->processor_id & 0xff) == PRID_REV_R3000A) in cpu_probe_legacy()
189 c->cputype = CPU_R3081E; in cpu_probe_legacy()
191 c->cputype = CPU_R3000A; in cpu_probe_legacy()
193 c->cputype = CPU_R3000; in cpu_probe_legacy()
194 c->isa_level = MIPS_CPU_ISA_I; in cpu_probe_legacy()
195 c->options = MIPS_CPU_TLB | MIPS_CPU_NOFPUEX; in cpu_probe_legacy()
197 c->options |= MIPS_CPU_FPU; in cpu_probe_legacy()
198 c->tlbsize = 64; in cpu_probe_legacy()
202 if ((c->processor_id & 0xff) >= PRID_REV_R4400) in cpu_probe_legacy()
203 c->cputype = CPU_R4400PC; in cpu_probe_legacy()
205 c->cputype = CPU_R4000PC; in cpu_probe_legacy()
207 if ((c->processor_id & 0xff) >= PRID_REV_R4400) in cpu_probe_legacy()
208 c->cputype = CPU_R4400SC; in cpu_probe_legacy()
210 c->cputype = CPU_R4000SC; in cpu_probe_legacy()
213 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
214 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
217 c->tlbsize = 48; in cpu_probe_legacy()
220 switch (c->processor_id & 0xf0) { in cpu_probe_legacy()
223 c->cputype = CPU_VR4111; in cpu_probe_legacy()
227 c->cputype = CPU_VR4181; in cpu_probe_legacy()
231 c->cputype = CPU_VR4121; in cpu_probe_legacy()
234 if ((c->processor_id & 0xf) < 0x3) in cpu_probe_legacy()
235 c->cputype = CPU_VR4122; in cpu_probe_legacy()
237 c->cputype = CPU_VR4181A; in cpu_probe_legacy()
240 if ((c->processor_id & 0xf) < 0x4) in cpu_probe_legacy()
241 c->cputype = CPU_VR4131; in cpu_probe_legacy()
243 c->cputype = CPU_VR4133; in cpu_probe_legacy()
247 c->cputype = CPU_VR41XX; in cpu_probe_legacy()
250 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
251 c->options = R4K_OPTS; in cpu_probe_legacy()
252 c->tlbsize = 32; in cpu_probe_legacy()
255 c->cputype = CPU_R4300; in cpu_probe_legacy()
256 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
257 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
259 c->tlbsize = 32; in cpu_probe_legacy()
262 c->cputype = CPU_R4600; in cpu_probe_legacy()
263 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
264 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_LLSC; in cpu_probe_legacy()
265 c->tlbsize = 48; in cpu_probe_legacy()
275 c->cputype = CPU_R4650; in cpu_probe_legacy()
276 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
277 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_LLSC; in cpu_probe_legacy()
278 c->tlbsize = 48; in cpu_probe_legacy()
282 c->isa_level = MIPS_CPU_ISA_I; in cpu_probe_legacy()
283 c->options = MIPS_CPU_TLB; in cpu_probe_legacy()
285 if ((c->processor_id & 0xf0) == (PRID_REV_TX3927 & 0xf0)) { in cpu_probe_legacy()
286 c->cputype = CPU_TX3927; in cpu_probe_legacy()
287 c->tlbsize = 64; in cpu_probe_legacy()
289 switch (c->processor_id & 0xff) { in cpu_probe_legacy()
291 c->cputype = CPU_TX3912; in cpu_probe_legacy()
292 c->tlbsize = 32; in cpu_probe_legacy()
295 c->cputype = CPU_TX3922; in cpu_probe_legacy()
296 c->tlbsize = 64; in cpu_probe_legacy()
299 c->cputype = CPU_UNKNOWN; in cpu_probe_legacy()
305 c->cputype = CPU_R4700; in cpu_probe_legacy()
306 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
307 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
309 c->tlbsize = 48; in cpu_probe_legacy()
312 c->cputype = CPU_TX49XX; in cpu_probe_legacy()
313 c->isa_level = MIPS_CPU_ISA_III; in cpu_probe_legacy()
314 c->options = R4K_OPTS | MIPS_CPU_LLSC; in cpu_probe_legacy()
315 if (!(c->processor_id & 0x08)) in cpu_probe_legacy()
316 c->options |= MIPS_CPU_FPU | MIPS_CPU_32FPR; in cpu_probe_legacy()
317 c->tlbsize = 48; in cpu_probe_legacy()
320 c->cputype = CPU_R5000; in cpu_probe_legacy()
321 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
322 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
324 c->tlbsize = 48; in cpu_probe_legacy()
327 c->cputype = CPU_R5432; in cpu_probe_legacy()
328 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
329 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
331 c->tlbsize = 48; in cpu_probe_legacy()
334 c->cputype = CPU_R5500; in cpu_probe_legacy()
335 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
336 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
338 c->tlbsize = 48; in cpu_probe_legacy()
341 c->cputype = CPU_NEVADA; in cpu_probe_legacy()
342 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
343 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
345 c->tlbsize = 48; in cpu_probe_legacy()
348 c->cputype = CPU_R6000; in cpu_probe_legacy()
349 c->isa_level = MIPS_CPU_ISA_II; in cpu_probe_legacy()
350 c->options = MIPS_CPU_TLB | MIPS_CPU_FPU | in cpu_probe_legacy()
352 c->tlbsize = 32; in cpu_probe_legacy()
355 c->cputype = CPU_R6000A; in cpu_probe_legacy()
356 c->isa_level = MIPS_CPU_ISA_II; in cpu_probe_legacy()
357 c->options = MIPS_CPU_TLB | MIPS_CPU_FPU | in cpu_probe_legacy()
359 c->tlbsize = 32; in cpu_probe_legacy()
362 c->cputype = CPU_RM7000; in cpu_probe_legacy()
363 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
364 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
374 c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48; in cpu_probe_legacy()
377 c->cputype = CPU_RM9000; in cpu_probe_legacy()
378 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
379 c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR | in cpu_probe_legacy()
388 c->tlbsize = (read_c0_info() & (1 << 29)) ? 64 : 48; in cpu_probe_legacy()
391 c->cputype = CPU_R8000; in cpu_probe_legacy()
392 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
393 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in cpu_probe_legacy()
396 c->tlbsize = 384; /* has weird TLB: 3-way x 128 */ in cpu_probe_legacy()
399 c->cputype = CPU_R10000; in cpu_probe_legacy()
400 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
401 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in cpu_probe_legacy()
405 c->tlbsize = 64; in cpu_probe_legacy()
408 c->cputype = CPU_R12000; in cpu_probe_legacy()
409 c->isa_level = MIPS_CPU_ISA_IV; in cpu_probe_legacy()
410 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in cpu_probe_legacy()
414 c->tlbsize = 64; in cpu_probe_legacy()
417 c->cputype = CPU_UNKNOWN; in cpu_probe_legacy()
422 static inline void decode_config1(struct cpuinfo_mips *c) in decode_config1() argument
431 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in decode_config1()
436 c->options |= MIPS_CPU_WATCH; in decode_config1()
438 c->options |= MIPS_CPU_MIPS16; in decode_config1()
440 c->options |= MIPS_CPU_EJTAG; in decode_config1()
442 c->options |= MIPS_CPU_FPU; in decode_config1()
443 c->options |= MIPS_CPU_32FPR; in decode_config1()
445 c->scache.flags = MIPS_CACHE_NOT_PRESENT; in decode_config1()
447 c->tlbsize = ((config1 >> 25) & 0x3f) + 1; in decode_config1()
450 static inline void cpu_probe_mips(struct cpuinfo_mips *c) in cpu_probe_mips() argument
452 decode_config1(c); in cpu_probe_mips()
453 switch (c->processor_id & 0xff00) { in cpu_probe_mips()
455 c->cputype = CPU_4KC; in cpu_probe_mips()
456 c->isa_level = MIPS_CPU_ISA_M32; in cpu_probe_mips()
459 c->cputype = CPU_4KEC; in cpu_probe_mips()
460 c->isa_level = MIPS_CPU_ISA_M32; in cpu_probe_mips()
463 c->cputype = CPU_4KSC; in cpu_probe_mips()
464 c->isa_level = MIPS_CPU_ISA_M32; in cpu_probe_mips()
467 c->cputype = CPU_5KC; in cpu_probe_mips()
468 c->isa_level = MIPS_CPU_ISA_M64; in cpu_probe_mips()
471 c->cputype = CPU_20KC; in cpu_probe_mips()
472 c->isa_level = MIPS_CPU_ISA_M64; in cpu_probe_mips()
475 c->cputype = CPU_24K; in cpu_probe_mips()
476 c->isa_level = MIPS_CPU_ISA_M32; in cpu_probe_mips()
479 c->cputype = CPU_25KF; in cpu_probe_mips()
480 c->isa_level = MIPS_CPU_ISA_M64; in cpu_probe_mips()
482 c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT; in cpu_probe_mips()
485 c->cputype = CPU_UNKNOWN; in cpu_probe_mips()
490 static inline void cpu_probe_alchemy(struct cpuinfo_mips *c) in cpu_probe_alchemy() argument
492 decode_config1(c); in cpu_probe_alchemy()
493 c->options |= MIPS_CPU_PREFETCH; in cpu_probe_alchemy()
494 switch (c->processor_id & 0xff00) { in cpu_probe_alchemy()
497 switch ((c->processor_id >> 24) & 0xff) { in cpu_probe_alchemy()
499 c->cputype = CPU_AU1000; in cpu_probe_alchemy()
502 c->cputype = CPU_AU1500; in cpu_probe_alchemy()
505 c->cputype = CPU_AU1100; in cpu_probe_alchemy()
508 c->cputype = CPU_AU1550; in cpu_probe_alchemy()
511 c->cputype = CPU_AU1200; in cpu_probe_alchemy()
517 c->isa_level = MIPS_CPU_ISA_M32; in cpu_probe_alchemy()
520 c->cputype = CPU_UNKNOWN; in cpu_probe_alchemy()
525 static inline void cpu_probe_sibyte(struct cpuinfo_mips *c) in cpu_probe_sibyte() argument
527 decode_config1(c); in cpu_probe_sibyte()
528 switch (c->processor_id & 0xff00) { in cpu_probe_sibyte()
530 c->cputype = CPU_SB1; in cpu_probe_sibyte()
531 c->isa_level = MIPS_CPU_ISA_M64; in cpu_probe_sibyte()
532 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in cpu_probe_sibyte()
538 c->options |= MIPS_CPU_FPU | MIPS_CPU_32FPR; in cpu_probe_sibyte()
542 c->cputype = CPU_UNKNOWN; in cpu_probe_sibyte()
547 static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c) in cpu_probe_sandcraft() argument
549 decode_config1(c); in cpu_probe_sandcraft()
550 switch (c->processor_id & 0xff00) { in cpu_probe_sandcraft()
552 c->cputype = CPU_SR71000; in cpu_probe_sandcraft()
553 c->isa_level = MIPS_CPU_ISA_M64; in cpu_probe_sandcraft()
554 c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | in cpu_probe_sandcraft()
557 c->scache.ways = 8; in cpu_probe_sandcraft()
558 c->tlbsize = 64; in cpu_probe_sandcraft()
561 c->cputype = CPU_UNKNOWN; in cpu_probe_sandcraft()
568 struct cpuinfo_mips *c = ¤t_cpu_data; in cpu_probe() local
570 c->processor_id = PRID_IMP_UNKNOWN; in cpu_probe()
571 c->fpu_id = FPIR_IMP_NONE; in cpu_probe()
572 c->cputype = CPU_UNKNOWN; in cpu_probe()
574 c->processor_id = read_c0_prid(); in cpu_probe()
575 switch (c->processor_id & 0xff0000) { in cpu_probe()
578 cpu_probe_legacy(c); in cpu_probe()
581 cpu_probe_mips(c); in cpu_probe()
584 cpu_probe_alchemy(c); in cpu_probe()
587 cpu_probe_sibyte(c); in cpu_probe()
591 cpu_probe_sandcraft(c); in cpu_probe()
594 c->cputype = CPU_UNKNOWN; in cpu_probe()
596 if (c->options & MIPS_CPU_FPU) in cpu_probe()
597 c->fpu_id = cpu_get_fpu_id(); in cpu_probe()
602 struct cpuinfo_mips *c = ¤t_cpu_data; in cpu_report() local
604 printk("CPU revision is: %08x\n", c->processor_id); in cpu_report()
605 if (c->options & MIPS_CPU_FPU) in cpu_report()
606 printk("FPU revision is: %08x\n", c->fpu_id); in cpu_report()