Skip to contentSkip to conversation

MIPS: Add CPU support for Loongson1C

PATCH In review Yang Ling 1 participant 1 message May 12, 2016 MIPS

lore
Share & tools
lore

Yang Ling

author
#0 lore raw

PATCH 2/4 MIPS: Add CPU support for Loongson1C

Loongson 1C is a 32-bit SoC designed by Loongson Technology Co., Ltd, with many features similar to Loongson 1B.

---
 arch/mips/include/asm/cpu-type.h | 3 ++-
 arch/mips/include/asm/cpu.h      | 1 +
 arch/mips/kernel/cpu-probe.c     | 4 ++++
 3 files changed, 7 insertions(+), 1 deletion(-)
arch/mips/include/asm/cpu-type.h +2 -1
index fbe1881..bdd6dc1 100644
@@ -24,7 +24,8 @@ static inline int __pure __get_cpu_type(const int cpu_type)
 	case CPU_LOONGSON3:
 #endif
 
-#ifdef CONFIG_SYS_HAS_CPU_LOONGSON1B
+#if defined(CONFIG_SYS_HAS_CPU_LOONGSON1B) || \
+    defined(CONFIG_SYS_HAS_CPU_LOONGSON1C)
 	case CPU_LOONGSON1:
 #endif
 
arch/mips/include/asm/cpu.h +1 -0
index a7a9185..f70517d 100644
@@ -239,6 +239,7 @@
 #define PRID_REV_VR4130		0x0080
 #define PRID_REV_34K_V1_0_2	0x0022
 #define PRID_REV_LOONGSON1B	0x0020
+#define PRID_REV_LOONGSON1C	0x0020	/* Same as Loongson-1B */
 #define PRID_REV_LOONGSON2E	0x0002
 #define PRID_REV_LOONGSON2F	0x0003
 #define PRID_REV_LOONGSON3A	0x0005
arch/mips/kernel/cpu-probe.c +4 -0
index 785e9a1..7cf7a42 100644
@@ -1203,7 +1203,11 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
 
 		switch (c->processor_id & PRID_REV_MASK) {
 		case PRID_REV_LOONGSON1B:
+#if defined(CONFIG_LOONGSON1_LS1B)
 			__cpu_name[cpu] = "Loongson 1B";
+#elif defined(CONFIG_LOONGSON1_LS1C)
+			__cpu_name[cpu] = "Loongson 1C";
+#endif
 			break;
 		}
 
Signature · 1 line
1.9.1