.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2016 Imagination Technologies |
---|
3 | 4 | * 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. |
---|
9 | 5 | */ |
---|
10 | 6 | |
---|
11 | 7 | #include <linux/of.h> |
---|
12 | 8 | |
---|
13 | 9 | #include <asm/bootinfo.h> |
---|
14 | 10 | |
---|
| 11 | +char *system_type; |
---|
| 12 | + |
---|
15 | 13 | const char *get_system_type(void) |
---|
16 | 14 | { |
---|
17 | 15 | const char *str; |
---|
18 | 16 | int err; |
---|
19 | 17 | |
---|
| 18 | + if (system_type) |
---|
| 19 | + return system_type; |
---|
| 20 | + |
---|
20 | 21 | err = of_property_read_string(of_root, "model", &str); |
---|
21 | 22 | if (!err) |
---|
22 | 23 | return str; |
---|