MIPS: X1000: Add X1000 system type.
authorZhou Yanjie <zhouyanjie@zoho.com>
Tue, 30 Jul 2019 11:30:11 +0000 (19:30 +0800)
committerPaul Burton <paul.burton@mips.com>
Tue, 30 Jul 2019 16:41:14 +0000 (09:41 -0700)
Add X1000 system type for cat /proc/cpuinfo to give out X1000.

Signed-off-by: Zhou Yanjie <zhouyanjie@zoho.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: ralf@linux-mips.org
Cc: paul@crapouillou.net
Cc: jhogan@kernel.org
Cc: fancer.lancer@gmail.com
Cc: chenhc@lemote.com
Cc: tglx@linutronix.de
Cc: gregkh@linuxfoundation.org
Cc: armijn@tjaldur.nl
Cc: syq@debian.org
Cc: jiaxun.yang@flygoat.com
arch/mips/include/asm/bootinfo.h
arch/mips/include/asm/cpu.h
arch/mips/jz4740/setup.c

index 235bc2f..32ba103 100644 (file)
@@ -81,6 +81,7 @@ enum loongson_machine_type {
 #define  MACH_INGENIC_JZ4740   1       /* JZ4740 SOC           */
 #define  MACH_INGENIC_JZ4770   2       /* JZ4770 SOC           */
 #define  MACH_INGENIC_JZ4780   3       /* JZ4780 SOC           */
+#define  MACH_INGENIC_X1000            4       /* X1000 SOC            */
 
 extern char *system_type;
 const char *get_system_type(void);
index 62a72bb..6826f0a 100644 (file)
@@ -47,7 +47,7 @@
 #define PRID_COMP_CAVIUM       0x0d0000
 #define PRID_COMP_LOONGSON     0x140000
 #define PRID_COMP_INGENIC_D0   0xd00000        /* JZ4740, JZ4750 */
-#define PRID_COMP_INGENIC_D1   0xd10000        /* JZ4770, JZ4775 */
+#define PRID_COMP_INGENIC_D1   0xd10000        /* JZ4770, JZ4775, X1000 */
 #define PRID_COMP_INGENIC_E1   0xe10000        /* JZ4780 */
 
 /*
index 4264eaf..5c58f30 100644 (file)
@@ -45,6 +45,8 @@ static void __init jz4740_detect_mem(void)
 
 static unsigned long __init get_board_mach_type(const void *fdt)
 {
+       if (!fdt_node_check_compatible(fdt, 0, "ingenic,x1000"))
+               return MACH_INGENIC_X1000;
        if (!fdt_node_check_compatible(fdt, 0, "ingenic,jz4780"))
                return MACH_INGENIC_JZ4780;
        if (!fdt_node_check_compatible(fdt, 0, "ingenic,jz4770"))
@@ -85,6 +87,8 @@ void __init device_tree_init(void)
 const char *get_system_type(void)
 {
        switch (mips_machtype) {
+       case MACH_INGENIC_X1000:
+               return "X1000";
        case MACH_INGENIC_JZ4780:
                return "JZ4780";
        case MACH_INGENIC_JZ4770: