aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/cpu-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/cpu-probe.c')
-rw-r--r--arch/mips/kernel/cpu-probe.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 3562b854f2c..b1b304ea212 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -187,6 +187,7 @@ void __init check_wait(void)
187 case CPU_BCM6358: 187 case CPU_BCM6358:
188 case CPU_CAVIUM_OCTEON: 188 case CPU_CAVIUM_OCTEON:
189 case CPU_CAVIUM_OCTEON_PLUS: 189 case CPU_CAVIUM_OCTEON_PLUS:
190 case CPU_JZRISC:
190 cpu_wait = r4k_wait; 191 cpu_wait = r4k_wait;
191 break; 192 break;
192 193
@@ -760,6 +761,9 @@ static void __cpuinit decode_configs(struct cpuinfo_mips *c)
760 ok = decode_config4(c); 761 ok = decode_config4(c);
761 762
762 mips_probe_watch_registers(c); 763 mips_probe_watch_registers(c);
764
765 if (cpu_has_mips_r2)
766 c->core = read_c0_ebase() & 0x3ff;
763} 767}
764 768
765static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu) 769static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)
@@ -956,6 +960,22 @@ platform:
956 } 960 }
957} 961}
958 962
963static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu)
964{
965 decode_configs(c);
966 /* JZRISC does not implement the CP0 counter. */
967 c->options &= ~MIPS_CPU_COUNTER;
968 switch (c->processor_id & 0xff00) {
969 case PRID_IMP_JZRISC:
970 c->cputype = CPU_JZRISC;
971 __cpu_name[cpu] = "Ingenic JZRISC";
972 break;
973 default:
974 panic("Unknown Ingenic Processor ID!");
975 break;
976 }
977}
978
959const char *__cpu_name[NR_CPUS]; 979const char *__cpu_name[NR_CPUS];
960const char *__elf_platform; 980const char *__elf_platform;
961 981
@@ -994,6 +1014,9 @@ __cpuinit void cpu_probe(void)
994 case PRID_COMP_CAVIUM: 1014 case PRID_COMP_CAVIUM:
995 cpu_probe_cavium(c, cpu); 1015 cpu_probe_cavium(c, cpu);
996 break; 1016 break;
1017 case PRID_COMP_INGENIC:
1018 cpu_probe_ingenic(c, cpu);
1019 break;
997 } 1020 }
998 1021
999 BUG_ON(!__cpu_name[cpu]); 1022 BUG_ON(!__cpu_name[cpu]);