aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorJayachandran C <jayachandranc@netlogicmicro.com>2011-05-11 02:34:58 -0400
committerRalf Baechle <ralf@linux-mips.org>2011-05-19 04:55:39 -0400
commita7117c6bddcbfff2fa237a14a853b32cb94bf59a (patch)
tree3a81d4194766dedf274985047022d3441074a3db /arch/mips
parent61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff)
MIPS: Netlogic XLR/XLS processor IDs.
Add Netlogic Microsystems company ID and processor IDs for XLR and XLS processors for CPU probe. Add CPU_XLR to cpu_type_enum. Signed-off-by: Jayachandran C <jayachandranc@netlogicmicro.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/2367/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/cpu.h27
-rw-r--r--arch/mips/kernel/cpu-probe.c56
2 files changed, 83 insertions, 0 deletions
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index 86877539c6e8..34c0d3cb116f 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -33,6 +33,7 @@
33#define PRID_COMP_TOSHIBA 0x070000 33#define PRID_COMP_TOSHIBA 0x070000
34#define PRID_COMP_LSI 0x080000 34#define PRID_COMP_LSI 0x080000
35#define PRID_COMP_LEXRA 0x0b0000 35#define PRID_COMP_LEXRA 0x0b0000
36#define PRID_COMP_NETLOGIC 0x0c0000
36#define PRID_COMP_CAVIUM 0x0d0000 37#define PRID_COMP_CAVIUM 0x0d0000
37#define PRID_COMP_INGENIC 0xd00000 38#define PRID_COMP_INGENIC 0xd00000
38 39
@@ -142,6 +143,31 @@
142#define PRID_IMP_JZRISC 0x0200 143#define PRID_IMP_JZRISC 0x0200
143 144
144/* 145/*
146 * These are the PRID's for when 23:16 == PRID_COMP_NETLOGIC
147 */
148#define PRID_IMP_NETLOGIC_XLR732 0x0000
149#define PRID_IMP_NETLOGIC_XLR716 0x0200
150#define PRID_IMP_NETLOGIC_XLR532 0x0900
151#define PRID_IMP_NETLOGIC_XLR308 0x0600
152#define PRID_IMP_NETLOGIC_XLR532C 0x0800
153#define PRID_IMP_NETLOGIC_XLR516C 0x0a00
154#define PRID_IMP_NETLOGIC_XLR508C 0x0b00
155#define PRID_IMP_NETLOGIC_XLR308C 0x0f00
156#define PRID_IMP_NETLOGIC_XLS608 0x8000
157#define PRID_IMP_NETLOGIC_XLS408 0x8800
158#define PRID_IMP_NETLOGIC_XLS404 0x8c00
159#define PRID_IMP_NETLOGIC_XLS208 0x8e00
160#define PRID_IMP_NETLOGIC_XLS204 0x8f00
161#define PRID_IMP_NETLOGIC_XLS108 0xce00
162#define PRID_IMP_NETLOGIC_XLS104 0xcf00
163#define PRID_IMP_NETLOGIC_XLS616B 0x4000
164#define PRID_IMP_NETLOGIC_XLS608B 0x4a00
165#define PRID_IMP_NETLOGIC_XLS416B 0x4400
166#define PRID_IMP_NETLOGIC_XLS412B 0x4c00
167#define PRID_IMP_NETLOGIC_XLS408B 0x4e00
168#define PRID_IMP_NETLOGIC_XLS404B 0x4f00
169
170/*
145 * Definitions for 7:0 on legacy processors 171 * Definitions for 7:0 on legacy processors
146 */ 172 */
147 173
@@ -234,6 +260,7 @@ enum cpu_type_enum {
234 */ 260 */
235 CPU_5KC, CPU_20KC, CPU_25KF, CPU_SB1, CPU_SB1A, CPU_LOONGSON2, 261 CPU_5KC, CPU_20KC, CPU_25KF, CPU_SB1, CPU_SB1A, CPU_LOONGSON2,
236 CPU_CAVIUM_OCTEON, CPU_CAVIUM_OCTEON_PLUS, CPU_CAVIUM_OCTEON2, 262 CPU_CAVIUM_OCTEON, CPU_CAVIUM_OCTEON_PLUS, CPU_CAVIUM_OCTEON2,
263 CPU_XLR,
237 264
238 CPU_LAST 265 CPU_LAST
239}; 266};
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index f65d4c8c65a6..c7b7eb24e277 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -988,6 +988,59 @@ static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu)
988 } 988 }
989} 989}
990 990
991static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu)
992{
993 decode_configs(c);
994
995 c->options = (MIPS_CPU_TLB |
996 MIPS_CPU_4KEX |
997 MIPS_CPU_COUNTER |
998 MIPS_CPU_DIVEC |
999 MIPS_CPU_WATCH |
1000 MIPS_CPU_EJTAG |
1001 MIPS_CPU_LLSC);
1002
1003 switch (c->processor_id & 0xff00) {
1004 case PRID_IMP_NETLOGIC_XLR732:
1005 case PRID_IMP_NETLOGIC_XLR716:
1006 case PRID_IMP_NETLOGIC_XLR532:
1007 case PRID_IMP_NETLOGIC_XLR308:
1008 case PRID_IMP_NETLOGIC_XLR532C:
1009 case PRID_IMP_NETLOGIC_XLR516C:
1010 case PRID_IMP_NETLOGIC_XLR508C:
1011 case PRID_IMP_NETLOGIC_XLR308C:
1012 c->cputype = CPU_XLR;
1013 __cpu_name[cpu] = "Netlogic XLR";
1014 break;
1015
1016 case PRID_IMP_NETLOGIC_XLS608:
1017 case PRID_IMP_NETLOGIC_XLS408:
1018 case PRID_IMP_NETLOGIC_XLS404:
1019 case PRID_IMP_NETLOGIC_XLS208:
1020 case PRID_IMP_NETLOGIC_XLS204:
1021 case PRID_IMP_NETLOGIC_XLS108:
1022 case PRID_IMP_NETLOGIC_XLS104:
1023 case PRID_IMP_NETLOGIC_XLS616B:
1024 case PRID_IMP_NETLOGIC_XLS608B:
1025 case PRID_IMP_NETLOGIC_XLS416B:
1026 case PRID_IMP_NETLOGIC_XLS412B:
1027 case PRID_IMP_NETLOGIC_XLS408B:
1028 case PRID_IMP_NETLOGIC_XLS404B:
1029 c->cputype = CPU_XLR;
1030 __cpu_name[cpu] = "Netlogic XLS";
1031 break;
1032
1033 default:
1034 printk(KERN_INFO "Unknown Netlogic chip id [%02x]!\n",
1035 c->processor_id);
1036 c->cputype = CPU_XLR;
1037 break;
1038 }
1039
1040 c->isa_level = MIPS_CPU_ISA_M64R1;
1041 c->tlbsize = ((read_c0_config1() >> 25) & 0x3f) + 1;
1042}
1043
991#ifdef CONFIG_64BIT 1044#ifdef CONFIG_64BIT
992/* For use by uaccess.h */ 1045/* For use by uaccess.h */
993u64 __ua_limit; 1046u64 __ua_limit;
@@ -1035,6 +1088,9 @@ __cpuinit void cpu_probe(void)
1035 case PRID_COMP_INGENIC: 1088 case PRID_COMP_INGENIC:
1036 cpu_probe_ingenic(c, cpu); 1089 cpu_probe_ingenic(c, cpu);
1037 break; 1090 break;
1091 case PRID_COMP_NETLOGIC:
1092 cpu_probe_netlogic(c, cpu);
1093 break;
1038 } 1094 }
1039 1095
1040 BUG_ON(!__cpu_name[cpu]); 1096 BUG_ON(!__cpu_name[cpu]);