aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorManuel Lauss <mano@roarinelk.homelinux.net>2009-03-25 12:49:28 -0400
committerRalf Baechle <ralf@linux-mips.org>2009-03-30 08:49:45 -0400
commit270717a8a0e5f03c104a6d47466036b615edfcde (patch)
tree33b319a455d24b246df5200e523aa66a7341cb42 /arch
parent76544504aebc606b8279a5314595af5d568e7fea (diff)
MIPS: Alchemy: unify CPU model constants.
This patch removes the various CPU_AU1??? model constants in favor of a single CPU_ALCHEMY one. All currently existing Alchemy models are identical in terms of cpu core and cache size/organization. The parts of the mips kernel which need to know the exact CPU revision extract it from the c0_prid register already; and finally nothing else in-tree depends on those any more. Should a new variant with slightly different "company options" and/or "processor revision" bits in c0_prid appear, it will be supported immediately (minus an exact model string in cpuinfo). Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/cpu.h3
-rw-r--r--arch/mips/kernel/cpu-probe.c21
-rw-r--r--arch/mips/mm/c-r4k.c17
-rw-r--r--arch/mips/mm/tlbex.c8
4 files changed, 11 insertions, 38 deletions
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index c018727c7ddc..3bdc0e3d89cc 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -209,8 +209,7 @@ enum cpu_type_enum {
209 * MIPS32 class processors 209 * MIPS32 class processors
210 */ 210 */
211 CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K, 211 CPU_4KC, CPU_4KEC, CPU_4KSC, CPU_24K, CPU_34K, CPU_1004K, CPU_74K,
212 CPU_AU1000, CPU_AU1100, CPU_AU1200, CPU_AU1210, CPU_AU1250, CPU_AU1500, 212 CPU_ALCHEMY, CPU_PR4450, CPU_BCM3302, CPU_BCM4710,
213 CPU_AU1550, CPU_PR4450, CPU_BCM3302, CPU_BCM4710,
214 213
215 /* 214 /*
216 * MIPS64 class processors 215 * MIPS64 class processors
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 1bdbcad3bb74..b13b8eb30596 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -183,13 +183,7 @@ void __init check_wait(void)
183 case CPU_TX49XX: 183 case CPU_TX49XX:
184 cpu_wait = r4k_wait_irqoff; 184 cpu_wait = r4k_wait_irqoff;
185 break; 185 break;
186 case CPU_AU1000: 186 case CPU_ALCHEMY:
187 case CPU_AU1100:
188 case CPU_AU1500:
189 case CPU_AU1550:
190 case CPU_AU1200:
191 case CPU_AU1210:
192 case CPU_AU1250:
193 cpu_wait = au1k_wait; 187 cpu_wait = au1k_wait;
194 break; 188 break;
195 case CPU_20KC: 189 case CPU_20KC:
@@ -783,37 +777,30 @@ static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu)
783 switch (c->processor_id & 0xff00) { 777 switch (c->processor_id & 0xff00) {
784 case PRID_IMP_AU1_REV1: 778 case PRID_IMP_AU1_REV1:
785 case PRID_IMP_AU1_REV2: 779 case PRID_IMP_AU1_REV2:
780 c->cputype = CPU_ALCHEMY;
786 switch ((c->processor_id >> 24) & 0xff) { 781 switch ((c->processor_id >> 24) & 0xff) {
787 case 0: 782 case 0:
788 c->cputype = CPU_AU1000;
789 __cpu_name[cpu] = "Au1000"; 783 __cpu_name[cpu] = "Au1000";
790 break; 784 break;
791 case 1: 785 case 1:
792 c->cputype = CPU_AU1500;
793 __cpu_name[cpu] = "Au1500"; 786 __cpu_name[cpu] = "Au1500";
794 break; 787 break;
795 case 2: 788 case 2:
796 c->cputype = CPU_AU1100;
797 __cpu_name[cpu] = "Au1100"; 789 __cpu_name[cpu] = "Au1100";
798 break; 790 break;
799 case 3: 791 case 3:
800 c->cputype = CPU_AU1550;
801 __cpu_name[cpu] = "Au1550"; 792 __cpu_name[cpu] = "Au1550";
802 break; 793 break;
803 case 4: 794 case 4:
804 c->cputype = CPU_AU1200;
805 __cpu_name[cpu] = "Au1200"; 795 __cpu_name[cpu] = "Au1200";
806 if ((c->processor_id & 0xff) == 2) { 796 if ((c->processor_id & 0xff) == 2)
807 c->cputype = CPU_AU1250;
808 __cpu_name[cpu] = "Au1250"; 797 __cpu_name[cpu] = "Au1250";
809 }
810 break; 798 break;
811 case 5: 799 case 5:
812 c->cputype = CPU_AU1210;
813 __cpu_name[cpu] = "Au1210"; 800 __cpu_name[cpu] = "Au1210";
814 break; 801 break;
815 default: 802 default:
816 panic("Unknown Au Core!"); 803 __cpu_name[cpu] = "Au1xxx";
817 break; 804 break;
818 } 805 }
819 break; 806 break;
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 871e828bc62a..58d9075e86fe 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -1026,13 +1026,7 @@ static void __cpuinit probe_pcache(void)
1026 c->icache.flags |= MIPS_CACHE_VTAG; 1026 c->icache.flags |= MIPS_CACHE_VTAG;
1027 break; 1027 break;
1028 1028
1029 case CPU_AU1000: 1029 case CPU_ALCHEMY:
1030 case CPU_AU1500:
1031 case CPU_AU1100:
1032 case CPU_AU1550:
1033 case CPU_AU1200:
1034 case CPU_AU1210:
1035 case CPU_AU1250:
1036 c->icache.flags |= MIPS_CACHE_IC_F_DC; 1030 c->icache.flags |= MIPS_CACHE_IC_F_DC;
1037 break; 1031 break;
1038 } 1032 }
@@ -1244,7 +1238,7 @@ void au1x00_fixup_config_od(void)
1244 /* 1238 /*
1245 * Au1100 errata actually keeps silence about this bit, so we set it 1239 * Au1100 errata actually keeps silence about this bit, so we set it
1246 * just in case for those revisions that require it to be set according 1240 * just in case for those revisions that require it to be set according
1247 * to arch/mips/au1000/common/cputable.c 1241 * to the (now gone) cpu table.
1248 */ 1242 */
1249 case 0x02030200: /* Au1100 AB */ 1243 case 0x02030200: /* Au1100 AB */
1250 case 0x02030201: /* Au1100 BA */ 1244 case 0x02030201: /* Au1100 BA */
@@ -1314,11 +1308,10 @@ static void __cpuinit coherency_setup(void)
1314 break; 1308 break;
1315 /* 1309 /*
1316 * We need to catch the early Alchemy SOCs with 1310 * We need to catch the early Alchemy SOCs with
1317 * the write-only co_config.od bit and set it back to one... 1311 * the write-only co_config.od bit and set it back to one on:
1312 * Au1000 rev DA, HA, HB; Au1100 AB, BA, BC, Au1500 AB
1318 */ 1313 */
1319 case CPU_AU1000: /* rev. DA, HA, HB */ 1314 case CPU_ALCHEMY:
1320 case CPU_AU1100: /* rev. AB, BA, BC ?? */
1321 case CPU_AU1500: /* rev. AB */
1322 au1x00_fixup_config_od(); 1315 au1x00_fixup_config_od();
1323 break; 1316 break;
1324 1317
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index f335cf6cdd78..122c9c12e75a 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -292,13 +292,7 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l,
292 case CPU_R4300: 292 case CPU_R4300:
293 case CPU_5KC: 293 case CPU_5KC:
294 case CPU_TX49XX: 294 case CPU_TX49XX:
295 case CPU_AU1000: 295 case CPU_ALCHEMY:
296 case CPU_AU1100:
297 case CPU_AU1500:
298 case CPU_AU1550:
299 case CPU_AU1200:
300 case CPU_AU1210:
301 case CPU_AU1250:
302 case CPU_PR4450: 296 case CPU_PR4450:
303 uasm_i_nop(p); 297 uasm_i_nop(p);
304 tlbw(p); 298 tlbw(p);