diff options
Diffstat (limited to 'arch/mips/loongson32/common/setup.c')
-rw-r--r-- | arch/mips/loongson32/common/setup.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/mips/loongson32/common/setup.c b/arch/mips/loongson32/common/setup.c new file mode 100644 index 000000000..4733fe037 --- /dev/null +++ b/arch/mips/loongson32/common/setup.c | |||
@@ -0,0 +1,26 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
2 | /* | ||
3 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | ||
4 | */ | ||
5 | |||
6 | #include <linux/io.h> | ||
7 | #include <linux/init.h> | ||
8 | #include <linux/smp.h> | ||
9 | #include <asm/cpu-info.h> | ||
10 | #include <asm/bootinfo.h> | ||
11 | |||
12 | const char *get_system_type(void) | ||
13 | { | ||
14 | unsigned int processor_id = (¤t_cpu_data)->processor_id; | ||
15 | |||
16 | switch (processor_id & PRID_REV_MASK) { | ||
17 | case PRID_REV_LOONGSON1B: | ||
18 | #if defined(CONFIG_LOONGSON1_LS1B) | ||
19 | return "LOONGSON LS1B"; | ||
20 | #elif defined(CONFIG_LOONGSON1_LS1C) | ||
21 | return "LOONGSON LS1C"; | ||
22 | #endif | ||
23 | default: | ||
24 | return "LOONGSON (unknown)"; | ||
25 | } | ||
26 | } | ||