Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Netlogic: Add support for XLP5XX

Add support for the XLP5XX processor which is an 8 core variant of the
XLP9XX. Add XLP5XX cases to code which earlier handled XLP9XX.

Signed-off-by: Yonghong Song <ysong@broadcom.com>
Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6871/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Yonghong Song and committed by
Ralf Baechle
1c983986 edf3ed5e

+23 -4
+1
arch/mips/include/asm/cpu.h
··· 201 201 #define PRID_IMP_NETLOGIC_XLP3XX 0x1100 202 202 #define PRID_IMP_NETLOGIC_XLP2XX 0x1200 203 203 #define PRID_IMP_NETLOGIC_XLP9XX 0x1500 204 + #define PRID_IMP_NETLOGIC_XLP5XX 0x1300 204 205 205 206 /* 206 207 * Particular Revision values for bits 7:0 of the PRId register.
+2 -1
arch/mips/include/asm/netlogic/mips-extns.h
··· 148 148 { 149 149 uint32_t prid = read_c0_prid() & PRID_IMP_MASK; 150 150 151 - if (prid == PRID_IMP_NETLOGIC_XLP9XX) 151 + if ((prid == PRID_IMP_NETLOGIC_XLP9XX) || 152 + (prid == PRID_IMP_NETLOGIC_XLP5XX)) 152 153 return (__read_32bit_c0_register($15, 1) >> 7) & 0x7; 153 154 else 154 155 return (__read_32bit_c0_register($15, 1) >> 5) & 0x3;
+4 -2
arch/mips/include/asm/netlogic/xlp-hal/xlp.h
··· 102 102 int chip = read_c0_prid() & PRID_IMP_MASK; 103 103 104 104 return chip == PRID_IMP_NETLOGIC_XLP2XX || 105 - chip == PRID_IMP_NETLOGIC_XLP9XX; 105 + chip == PRID_IMP_NETLOGIC_XLP9XX || 106 + chip == PRID_IMP_NETLOGIC_XLP5XX; 106 107 } 107 108 108 109 static inline int cpu_is_xlp9xx(void) 109 110 { 110 111 int chip = read_c0_prid() & PRID_IMP_MASK; 111 112 112 - return chip == PRID_IMP_NETLOGIC_XLP9XX; 113 + return chip == PRID_IMP_NETLOGIC_XLP9XX || 114 + chip == PRID_IMP_NETLOGIC_XLP5XX; 113 115 } 114 116 #endif /* !__ASSEMBLY__ */ 115 117 #endif /* _ASM_NLM_XLP_H */
+1
arch/mips/kernel/cpu-probe.c
··· 1059 1059 switch (c->processor_id & PRID_IMP_MASK) { 1060 1060 case PRID_IMP_NETLOGIC_XLP2XX: 1061 1061 case PRID_IMP_NETLOGIC_XLP9XX: 1062 + case PRID_IMP_NETLOGIC_XLP5XX: 1062 1063 c->cputype = CPU_XLP; 1063 1064 __cpu_name[cpu] = "Broadcom XLPII"; 1064 1065 break;
+4
arch/mips/netlogic/common/reset.S
··· 177 177 beq t0, t1, 2f /* does not need to set coherent */ 178 178 nop 179 179 180 + li t1, 0x1300 /* XLP 5xx */ 181 + beq t0, t1, 2f /* does not need to set coherent */ 182 + nop 183 + 180 184 /* set bit in SYS coherent register for the core */ 181 185 mfc0 t0, CP0_EBASE, 1 182 186 mfc0 t1, CP0_EBASE, 1
+1
arch/mips/netlogic/xlp/dt.c
··· 51 51 switch (current_cpu_data.processor_id & PRID_IMP_MASK) { 52 52 #ifdef CONFIG_DT_XLP_GVP 53 53 case PRID_IMP_NETLOGIC_XLP9XX: 54 + case PRID_IMP_NETLOGIC_XLP5XX: 54 55 fdtp = __dtb_xlp_gvp_begin; 55 56 break; 56 57 #endif
+1
arch/mips/netlogic/xlp/setup.c
··· 123 123 { 124 124 switch (read_c0_prid() & PRID_IMP_MASK) { 125 125 case PRID_IMP_NETLOGIC_XLP9XX: 126 + case PRID_IMP_NETLOGIC_XLP5XX: 126 127 case PRID_IMP_NETLOGIC_XLP2XX: 127 128 return "Broadcom XLPII Series"; 128 129 default:
+9 -1
arch/mips/netlogic/xlp/wakeup.c
··· 135 135 if (cpu_is_xlp9xx()) { 136 136 fusebase = nlm_get_fuse_regbase(n); 137 137 fusemask = nlm_read_reg(fusebase, FUSE_9XX_DEVCFG6); 138 - mask = 0xfffff; 138 + switch (read_c0_prid() & PRID_IMP_MASK) { 139 + case PRID_IMP_NETLOGIC_XLP5XX: 140 + mask = 0xff; 141 + break; 142 + case PRID_IMP_NETLOGIC_XLP9XX: 143 + default: 144 + mask = 0xfffff; 145 + break; 146 + } 139 147 } else { 140 148 fusemask = nlm_read_sys_reg(nodep->sysbase, 141 149 SYS_EFUSE_DEVICE_CFG_STATUS0);