blob: 8b03e18fc4d8f59ab71bff640e39042736e5ef7a [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com>
4 */
5
6#include <asm/bootinfo.h>
7
8#include <prom.h>
9
10void __init plat_mem_setup(void)
11{
12 add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM);
13}
14
15const char *get_system_type(void)
16{
17 unsigned int processor_id = (&current_cpu_data)->processor_id;
18
19 switch (processor_id & PRID_REV_MASK) {
20 case PRID_REV_LOONGSON1B:
21#if defined(CONFIG_LOONGSON1_LS1B)
22 return "LOONGSON LS1B";
23#elif defined(CONFIG_LOONGSON1_LS1C)
24 return "LOONGSON LS1C";
25#endif
26 default:
27 return "LOONGSON (unknown)";
28 }
29}