aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayachandran C <jchandra@broadcom.com>2013-12-21 06:22:20 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-01-24 16:39:48 -0500
commit8907c55e725087633fde1dc0aa942d871451e6a7 (patch)
treecd761790e6a4e447a8a224e8c76b009f811ec867
parentdb038feedd9a5c83851d2f5aa6a84ff800da8ccb (diff)
MIPS: Netlogic: Identify XLP 9XX chip
Adds processor ID of XLP 9XX to asm/cpu.h. Update netlogic/xlp-hal/xlp.h to add cpu_is_xlp9xx() and to update cpu_is_xlpii() to support XLP 9XX. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/6274/
-rw-r--r--arch/mips/include/asm/cpu.h1
-rw-r--r--arch/mips/include/asm/netlogic/xlp-hal/xlp.h9
-rw-r--r--arch/mips/kernel/cpu-probe.c1
-rw-r--r--arch/mips/netlogic/xlp/setup.c1
4 files changed, 11 insertions, 1 deletions
diff --git a/arch/mips/include/asm/cpu.h b/arch/mips/include/asm/cpu.h
index a0ec93054636..76411df3d971 100644
--- a/arch/mips/include/asm/cpu.h
+++ b/arch/mips/include/asm/cpu.h
@@ -198,6 +198,7 @@
198#define PRID_IMP_NETLOGIC_XLP8XX 0x1000 198#define PRID_IMP_NETLOGIC_XLP8XX 0x1000
199#define PRID_IMP_NETLOGIC_XLP3XX 0x1100 199#define PRID_IMP_NETLOGIC_XLP3XX 0x1100
200#define PRID_IMP_NETLOGIC_XLP2XX 0x1200 200#define PRID_IMP_NETLOGIC_XLP2XX 0x1200
201#define PRID_IMP_NETLOGIC_XLP9XX 0x1500
201 202
202/* 203/*
203 * Particular Revision values for bits 7:0 of the PRId register. 204 * Particular Revision values for bits 7:0 of the PRId register.
diff --git a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
index e62e7be52eee..9ccdb7d0f073 100644
--- a/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
+++ b/arch/mips/include/asm/netlogic/xlp-hal/xlp.h
@@ -92,8 +92,15 @@ static inline int cpu_is_xlpii(void)
92{ 92{
93 int chip = read_c0_prid() & 0xff00; 93 int chip = read_c0_prid() & 0xff00;
94 94
95 return chip == PRID_IMP_NETLOGIC_XLP2XX; 95 return chip == PRID_IMP_NETLOGIC_XLP2XX ||
96 chip == PRID_IMP_NETLOGIC_XLP9XX;
96} 97}
97 98
99static inline int cpu_is_xlp9xx(void)
100{
101 int chip = read_c0_prid() & 0xff00;
102
103 return chip == PRID_IMP_NETLOGIC_XLP9XX;
104}
98#endif /* !__ASSEMBLY__ */ 105#endif /* !__ASSEMBLY__ */
99#endif /* _ASM_NLM_XLP_H */ 106#endif /* _ASM_NLM_XLP_H */
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 32db114a4a8e..530f832de02c 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -1031,6 +1031,7 @@ static inline void cpu_probe_netlogic(struct cpuinfo_mips *c, int cpu)
1031 1031
1032 switch (c->processor_id & PRID_IMP_MASK) { 1032 switch (c->processor_id & PRID_IMP_MASK) {
1033 case PRID_IMP_NETLOGIC_XLP2XX: 1033 case PRID_IMP_NETLOGIC_XLP2XX:
1034 case PRID_IMP_NETLOGIC_XLP9XX:
1034 c->cputype = CPU_XLP; 1035 c->cputype = CPU_XLP;
1035 __cpu_name[cpu] = "Broadcom XLPII"; 1036 __cpu_name[cpu] = "Broadcom XLPII";
1036 break; 1037 break;
diff --git a/arch/mips/netlogic/xlp/setup.c b/arch/mips/netlogic/xlp/setup.c
index 6d981bb337ec..e92adec8a63b 100644
--- a/arch/mips/netlogic/xlp/setup.c
+++ b/arch/mips/netlogic/xlp/setup.c
@@ -111,6 +111,7 @@ void __init plat_mem_setup(void)
111const char *get_system_type(void) 111const char *get_system_type(void)
112{ 112{
113 switch (read_c0_prid() & 0xff00) { 113 switch (read_c0_prid() & 0xff00) {
114 case PRID_IMP_NETLOGIC_XLP9XX:
114 case PRID_IMP_NETLOGIC_XLP2XX: 115 case PRID_IMP_NETLOGIC_XLP2XX:
115 return "Broadcom XLPII Series"; 116 return "Broadcom XLPII Series";
116 default: 117 default: