diff options
Diffstat (limited to 'arch/mips/loongson1/common/setup.c')
-rw-r--r-- | arch/mips/loongson1/common/setup.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/mips/loongson1/common/setup.c b/arch/mips/loongson1/common/setup.c new file mode 100644 index 00000000000..62128cc27e6 --- /dev/null +++ b/arch/mips/loongson1/common/setup.c | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License as published by the | ||
6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
7 | * option) any later version. | ||
8 | */ | ||
9 | |||
10 | #include <asm/bootinfo.h> | ||
11 | |||
12 | #include <prom.h> | ||
13 | |||
14 | void __init plat_mem_setup(void) | ||
15 | { | ||
16 | add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM); | ||
17 | } | ||
18 | |||
19 | const char *get_system_type(void) | ||
20 | { | ||
21 | unsigned int processor_id = (¤t_cpu_data)->processor_id; | ||
22 | |||
23 | switch (processor_id & PRID_REV_MASK) { | ||
24 | case PRID_REV_LOONGSON1B: | ||
25 | return "LOONGSON LS1B"; | ||
26 | default: | ||
27 | return "LOONGSON (unknown)"; | ||
28 | } | ||
29 | } | ||