diff options
Diffstat (limited to 'arch/mips/kernel/cpu-probe.c')
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index c9207b5fd923..a7162a4484cf 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -96,6 +96,9 @@ int allow_au1k_wait; | |||
96 | 96 | ||
97 | static void au1k_wait(void) | 97 | static void au1k_wait(void) |
98 | { | 98 | { |
99 | if (!allow_au1k_wait) | ||
100 | return; | ||
101 | |||
99 | /* using the wait instruction makes CP0 counter unusable */ | 102 | /* using the wait instruction makes CP0 counter unusable */ |
100 | __asm__(" .set mips3 \n" | 103 | __asm__(" .set mips3 \n" |
101 | " cache 0x14, 0(%0) \n" | 104 | " cache 0x14, 0(%0) \n" |
@@ -154,6 +157,7 @@ void __init check_wait(void) | |||
154 | case CPU_25KF: | 157 | case CPU_25KF: |
155 | case CPU_PR4450: | 158 | case CPU_PR4450: |
156 | case CPU_BCM3302: | 159 | case CPU_BCM3302: |
160 | case CPU_CAVIUM_OCTEON: | ||
157 | cpu_wait = r4k_wait; | 161 | cpu_wait = r4k_wait; |
158 | break; | 162 | break; |
159 | 163 | ||
@@ -185,8 +189,7 @@ void __init check_wait(void) | |||
185 | case CPU_AU1200: | 189 | case CPU_AU1200: |
186 | case CPU_AU1210: | 190 | case CPU_AU1210: |
187 | case CPU_AU1250: | 191 | case CPU_AU1250: |
188 | if (allow_au1k_wait) | 192 | cpu_wait = au1k_wait; |
189 | cpu_wait = au1k_wait; | ||
190 | break; | 193 | break; |
191 | case CPU_20KC: | 194 | case CPU_20KC: |
192 | /* | 195 | /* |
@@ -875,6 +878,27 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu) | |||
875 | } | 878 | } |
876 | } | 879 | } |
877 | 880 | ||
881 | static inline void cpu_probe_cavium(struct cpuinfo_mips *c, unsigned int cpu) | ||
882 | { | ||
883 | decode_configs(c); | ||
884 | switch (c->processor_id & 0xff00) { | ||
885 | case PRID_IMP_CAVIUM_CN38XX: | ||
886 | case PRID_IMP_CAVIUM_CN31XX: | ||
887 | case PRID_IMP_CAVIUM_CN30XX: | ||
888 | case PRID_IMP_CAVIUM_CN58XX: | ||
889 | case PRID_IMP_CAVIUM_CN56XX: | ||
890 | case PRID_IMP_CAVIUM_CN50XX: | ||
891 | case PRID_IMP_CAVIUM_CN52XX: | ||
892 | c->cputype = CPU_CAVIUM_OCTEON; | ||
893 | __cpu_name[cpu] = "Cavium Octeon"; | ||
894 | break; | ||
895 | default: | ||
896 | printk(KERN_INFO "Unknown Octeon chip!\n"); | ||
897 | c->cputype = CPU_UNKNOWN; | ||
898 | break; | ||
899 | } | ||
900 | } | ||
901 | |||
878 | const char *__cpu_name[NR_CPUS]; | 902 | const char *__cpu_name[NR_CPUS]; |
879 | 903 | ||
880 | __cpuinit void cpu_probe(void) | 904 | __cpuinit void cpu_probe(void) |
@@ -909,6 +933,9 @@ __cpuinit void cpu_probe(void) | |||
909 | case PRID_COMP_NXP: | 933 | case PRID_COMP_NXP: |
910 | cpu_probe_nxp(c, cpu); | 934 | cpu_probe_nxp(c, cpu); |
911 | break; | 935 | break; |
936 | case PRID_COMP_CAVIUM: | ||
937 | cpu_probe_cavium(c, cpu); | ||
938 | break; | ||
912 | } | 939 | } |
913 | 940 | ||
914 | BUG_ON(!__cpu_name[cpu]); | 941 | BUG_ON(!__cpu_name[cpu]); |