1 --- linux-mips-cvs/arch/mips/kernel/cpu-probe.c 2005-01-31 12:59:30.000000000 +0100
2 +++ linux-broadcom/arch/mips/kernel/cpu-probe.c 2005-01-31 13:13:14.000000000 +0100
5 static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
7 - switch (c->processor_id & 0xff00) {
8 + switch (c->processor_id & PRID_IMP_MASK) {
10 c->cputype = CPU_R2000;
11 c->isa_level = MIPS_CPU_ISA_I;
16 - if ((c->processor_id & 0xff) == PRID_REV_R3000A)
17 + if ((c->processor_id & PRID_REV_MASK) == PRID_REV_R3000A)
18 if (cpu_has_confreg())
19 c->cputype = CPU_R3081E;
24 if (read_c0_config() & CONF_SC) {
25 - if ((c->processor_id & 0xff) >= PRID_REV_R4400)
26 + if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_R4400)
27 c->cputype = CPU_R4400PC;
29 c->cputype = CPU_R4000PC;
31 - if ((c->processor_id & 0xff) >= PRID_REV_R4400)
32 + if ((c->processor_id & PRID_REV_MASK) >= PRID_REV_R4400)
33 c->cputype = CPU_R4400SC;
35 c->cputype = CPU_R4000SC;
37 static inline void cpu_probe_mips(struct cpuinfo_mips *c)
40 - switch (c->processor_id & 0xff00) {
41 + switch (c->processor_id & PRID_IMP_MASK) {
44 c->isa_level = MIPS_CPU_ISA_M32;
48 c->options |= MIPS_CPU_PREFETCH;
49 - switch (c->processor_id & 0xff00) {
50 + switch (c->processor_id & PRID_IMP_MASK) {
51 case PRID_IMP_AU1_REV1:
52 case PRID_IMP_AU1_REV2:
53 - switch ((c->processor_id >> 24) & 0xff) {
54 + switch ((c->processor_id >> 24) & PRID_REV_MASK) {
56 c->cputype = CPU_AU1000;
62 +static inline void cpu_probe_broadcom(struct cpuinfo_mips *c)
65 + c->options |= MIPS_CPU_PREFETCH;
66 + switch (c->processor_id & PRID_IMP_MASK) {
67 + case PRID_IMP_BCM4710:
68 + c->cputype = CPU_BCM4710;
69 + c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
70 + MIPS_CPU_4KTLB | MIPS_CPU_COUNTER;
71 + c->scache.flags = MIPS_CACHE_NOT_PRESENT;
74 + case PRID_IMP_BCM3302:
75 + c->cputype = CPU_BCM3302;
76 + c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
77 + MIPS_CPU_4KTLB | MIPS_CPU_COUNTER;
78 + c->scache.flags = MIPS_CACHE_NOT_PRESENT;
81 + c->cputype = CPU_UNKNOWN;
86 static inline void cpu_probe_sibyte(struct cpuinfo_mips *c)
89 - switch (c->processor_id & 0xff00) {
90 + switch (c->processor_id & PRID_IMP_MASK) {
93 c->isa_level = MIPS_CPU_ISA_M64;
95 static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c)
98 - switch (c->processor_id & 0xff00) {
99 + switch (c->processor_id & PRID_IMP_MASK) {
100 case PRID_IMP_SR71000:
101 c->cputype = CPU_SR71000;
102 c->isa_level = MIPS_CPU_ISA_M64;
104 c->cputype = CPU_UNKNOWN;
106 c->processor_id = read_c0_prid();
107 - switch (c->processor_id & 0xff0000) {
108 + switch (c->processor_id & PRID_COMP_MASK) {
110 case PRID_COMP_LEGACY:
113 case PRID_COMP_ALCHEMY:
114 cpu_probe_alchemy(c);
116 + case PRID_COMP_BROADCOM:
117 + cpu_probe_broadcom(c);
119 case PRID_COMP_SIBYTE: