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

MIPS: X2000: Add X2000 system type.

1.Add "PRID_COMP_INGENIC_13" and "PRID_IMP_XBURST2" for X2000.
2.Add X2000 system type for cat /proc/cpuinfo to give out X2000.

Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

authored by

周琰杰 (Zhou Yanjie) and committed by
Thomas Bogendoerfer
0d10d17b e8b9fc10

+20 -2
+1
arch/mips/include/asm/bootinfo.h
··· 80 80 MACH_INGENIC_JZ4780, 81 81 MACH_INGENIC_X1000, 82 82 MACH_INGENIC_X1830, 83 + MACH_INGENIC_X2000, 83 84 }; 84 85 85 86 extern char *system_type;
+4 -2
arch/mips/include/asm/cpu.h
··· 46 46 #define PRID_COMP_NETLOGIC 0x0c0000 47 47 #define PRID_COMP_CAVIUM 0x0d0000 48 48 #define PRID_COMP_LOONGSON 0x140000 49 + #define PRID_COMP_INGENIC_13 0x130000 /* X2000 */ 49 50 #define PRID_COMP_INGENIC_D0 0xd00000 /* JZ4740, JZ4750, X1830 */ 50 51 #define PRID_COMP_INGENIC_D1 0xd10000 /* JZ4770, JZ4775, X1000 */ 51 52 #define PRID_COMP_INGENIC_E1 0xe10000 /* JZ4780 */ ··· 186 185 * These are the PRID's for when 23:16 == PRID_COMP_INGENIC_* 187 186 */ 188 187 189 - #define PRID_IMP_XBURST_REV1 0x0200 /* XBurst with MXU SIMD ISA */ 190 - #define PRID_IMP_XBURST_REV2 0x0100 /* XBurst with MXU2 SIMD ISA */ 188 + #define PRID_IMP_XBURST_REV1 0x0200 /* XBurst®1 with MXU1.0/MXU1.1 SIMD ISA */ 189 + #define PRID_IMP_XBURST_REV2 0x0100 /* XBurst®1 with MXU2.0 SIMD ISA */ 190 + #define PRID_IMP_XBURST2 0x2000 /* XBurst®2 with MXU2.1 SIMD ISA */ 191 191 192 192 /* 193 193 * These are the PRID's for when 23:16 == PRID_COMP_NETLOGIC
+4
arch/mips/jz4740/setup.c
··· 49 49 50 50 static unsigned long __init get_board_mach_type(const void *fdt) 51 51 { 52 + if (!fdt_node_check_compatible(fdt, 0, "ingenic,x2000")) 53 + return MACH_INGENIC_X2000; 52 54 if (!fdt_node_check_compatible(fdt, 0, "ingenic,x1830")) 53 55 return MACH_INGENIC_X1830; 54 56 if (!fdt_node_check_compatible(fdt, 0, "ingenic,x1000")) ··· 95 93 const char *get_system_type(void) 96 94 { 97 95 switch (mips_machtype) { 96 + case MACH_INGENIC_X2000: 97 + return "X2000"; 98 98 case MACH_INGENIC_X1830: 99 99 return "X1830"; 100 100 case MACH_INGENIC_X1000:
+11
arch/mips/kernel/cpu-probe.c
··· 2110 2110 BUG_ON(!__builtin_constant_p(cpu_has_counter) || cpu_has_counter); 2111 2111 2112 2112 switch (c->processor_id & PRID_IMP_MASK) { 2113 + 2114 + /* XBurst®1 with MXU1.0/MXU1.1 SIMD ISA */ 2113 2115 case PRID_IMP_XBURST_REV1: 2114 2116 2115 2117 /* ··· 2150 2148 break; 2151 2149 } 2152 2150 fallthrough; 2151 + 2152 + /* XBurst®1 with MXU2.0 SIMD ISA */ 2153 2153 case PRID_IMP_XBURST_REV2: 2154 2154 c->cputype = CPU_XBURST; 2155 2155 c->writecombine = _CACHE_UNCACHED_ACCELERATED; 2156 2156 __cpu_name[cpu] = "Ingenic XBurst"; 2157 + break; 2158 + 2159 + /* XBurst®2 with MXU2.1 SIMD ISA */ 2160 + case PRID_IMP_XBURST2: 2161 + c->cputype = CPU_XBURST; 2162 + __cpu_name[cpu] = "Ingenic XBurst II"; 2157 2163 break; 2158 2164 2159 2165 default: ··· 2309 2299 case PRID_COMP_LOONGSON: 2310 2300 cpu_probe_loongson(c, cpu); 2311 2301 break; 2302 + case PRID_COMP_INGENIC_13: 2312 2303 case PRID_COMP_INGENIC_D0: 2313 2304 case PRID_COMP_INGENIC_D1: 2314 2305 case PRID_COMP_INGENIC_E1: