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.c40
1 files changed, 30 insertions, 10 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 1abe9905c9c1..f709657e4dcd 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -31,7 +31,7 @@
31 * The wait instruction stops the pipeline and reduces the power consumption of 31 * The wait instruction stops the pipeline and reduces the power consumption of
32 * the CPU very much. 32 * the CPU very much.
33 */ 33 */
34void (*cpu_wait)(void) = NULL; 34void (*cpu_wait)(void);
35 35
36static void r3081_wait(void) 36static void r3081_wait(void)
37{ 37{
@@ -91,16 +91,13 @@ static void rm7k_wait_irqoff(void)
91 local_irq_enable(); 91 local_irq_enable();
92} 92}
93 93
94/* The Au1xxx wait is available only if using 32khz counter or 94/*
95 * external timer source, but specifically not CP0 Counter. */ 95 * The Au1xxx wait is available only if using 32khz counter or
96int allow_au1k_wait; 96 * external timer source, but specifically not CP0 Counter.
97 97 * alchemy/common/time.c may override cpu_wait!
98 */
98static void au1k_wait(void) 99static void au1k_wait(void)
99{ 100{
100 if (!allow_au1k_wait)
101 return;
102
103 /* using the wait instruction makes CP0 counter unusable */
104 __asm__(" .set mips3 \n" 101 __asm__(" .set mips3 \n"
105 " cache 0x14, 0(%0) \n" 102 " cache 0x14, 0(%0) \n"
106 " cache 0x14, 32(%0) \n" 103 " cache 0x14, 32(%0) \n"
@@ -115,7 +112,7 @@ static void au1k_wait(void)
115 : : "r" (au1k_wait)); 112 : : "r" (au1k_wait));
116} 113}
117 114
118static int __initdata nowait = 0; 115static int __initdata nowait;
119 116
120static int __init wait_disable(char *s) 117static int __init wait_disable(char *s)
121{ 118{
@@ -159,6 +156,9 @@ void __init check_wait(void)
159 case CPU_25KF: 156 case CPU_25KF:
160 case CPU_PR4450: 157 case CPU_PR4450:
161 case CPU_BCM3302: 158 case CPU_BCM3302:
159 case CPU_BCM6338:
160 case CPU_BCM6348:
161 case CPU_BCM6358:
162 case CPU_CAVIUM_OCTEON: 162 case CPU_CAVIUM_OCTEON:
163 cpu_wait = r4k_wait; 163 cpu_wait = r4k_wait;
164 break; 164 break;
@@ -857,6 +857,7 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu)
857 decode_configs(c); 857 decode_configs(c);
858 switch (c->processor_id & 0xff00) { 858 switch (c->processor_id & 0xff00) {
859 case PRID_IMP_BCM3302: 859 case PRID_IMP_BCM3302:
860 /* same as PRID_IMP_BCM6338 */
860 c->cputype = CPU_BCM3302; 861 c->cputype = CPU_BCM3302;
861 __cpu_name[cpu] = "Broadcom BCM3302"; 862 __cpu_name[cpu] = "Broadcom BCM3302";
862 break; 863 break;
@@ -864,6 +865,25 @@ static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu)
864 c->cputype = CPU_BCM4710; 865 c->cputype = CPU_BCM4710;
865 __cpu_name[cpu] = "Broadcom BCM4710"; 866 __cpu_name[cpu] = "Broadcom BCM4710";
866 break; 867 break;
868 case PRID_IMP_BCM6345:
869 c->cputype = CPU_BCM6345;
870 __cpu_name[cpu] = "Broadcom BCM6345";
871 break;
872 case PRID_IMP_BCM6348:
873 c->cputype = CPU_BCM6348;
874 __cpu_name[cpu] = "Broadcom BCM6348";
875 break;
876 case PRID_IMP_BCM4350:
877 switch (c->processor_id & 0xf0) {
878 case PRID_REV_BCM6358:
879 c->cputype = CPU_BCM6358;
880 __cpu_name[cpu] = "Broadcom BCM6358";
881 break;
882 default:
883 c->cputype = CPU_UNKNOWN;
884 break;
885 }
886 break;
867 } 887 }
868} 888}
869 889