hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/mips/generic/proc.c
....@@ -1,22 +1,23 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2016 Imagination Technologies
34 * Author: Paul Burton <paul.burton@mips.com>
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms of the GNU General Public License as published by the
7
- * Free Software Foundation; either version 2 of the License, or (at your
8
- * option) any later version.
95 */
106
117 #include <linux/of.h>
128
139 #include <asm/bootinfo.h>
1410
11
+char *system_type;
12
+
1513 const char *get_system_type(void)
1614 {
1715 const char *str;
1816 int err;
1917
18
+ if (system_type)
19
+ return system_type;
20
+
2021 err = of_property_read_string(of_root, "model", &str);
2122 if (!err)
2223 return str;