Skip to content

Commit 7754326

Browse files
FlyGoattsbogend
authored andcommitted
MIPS: Loongson64: env: Hook up Loongsson-2K
Somehow those enablement bits were left over when we were adding initial Loongson-2K support. Set up basic information and select proper builtin DTB for Loongson-2K. Cc: [email protected] Signed-off-by: Jiaxun Yang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 335819f commit 7754326

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

arch/mips/include/asm/mach-loongson64/boot_param.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@ enum loongson_cpu_type {
4242
Legacy_1B = 0x5,
4343
Legacy_2G = 0x6,
4444
Legacy_2H = 0x7,
45+
Legacy_2K = 0x8,
4546
Loongson_1A = 0x100,
4647
Loongson_1B = 0x101,
4748
Loongson_2E = 0x200,
4849
Loongson_2F = 0x201,
4950
Loongson_2G = 0x202,
5051
Loongson_2H = 0x203,
52+
Loongson_2K = 0x204,
5153
Loongson_3A = 0x300,
5254
Loongson_3B = 0x301
5355
};

arch/mips/loongson64/env.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ void __init prom_lefi_init_env(void)
8888
cpu_clock_freq = ecpu->cpu_clock_freq;
8989
loongson_sysconf.cputype = ecpu->cputype;
9090
switch (ecpu->cputype) {
91+
case Legacy_2K:
92+
case Loongson_2K:
93+
smp_group[0] = 0x900000001fe11000;
94+
loongson_sysconf.cores_per_node = 2;
95+
loongson_sysconf.cores_per_package = 2;
96+
break;
9197
case Legacy_3A:
9298
case Loongson_3A:
9399
loongson_sysconf.cores_per_node = 4;
@@ -221,6 +227,8 @@ void __init prom_lefi_init_env(void)
221227
default:
222228
break;
223229
}
230+
} else if ((read_c0_prid() & PRID_IMP_MASK) == PRID_IMP_LOONGSON_64R) {
231+
loongson_fdt_blob = __dtb_loongson64_2core_2k1000_begin;
224232
} else if ((read_c0_prid() & PRID_IMP_MASK) == PRID_IMP_LOONGSON_64G) {
225233
if (loongson_sysconf.bridgetype == LS7A)
226234
loongson_fdt_blob = __dtb_loongson64g_4core_ls7a_begin;

0 commit comments

Comments
 (0)