summaryrefslogtreecommitdiffstats
path: root/arch/mips/generic
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2020-09-06 21:29:26 +0200
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-09-18 16:28:56 +0200
commit8405419942f2f012dc23b5c8817eded2d591b033 (patch)
treefa1cbfc0e439312879d9fb71162301630594f382 /arch/mips/generic
parentc434b9f80b0923e6460031b0fd964f8b0bf3c6a6 (diff)
downloadlinux-8405419942f2f012dc23b5c8817eded2d591b033.tar.bz2
MIPS: generic: Allow boards to set system type
Check for the system_type variable in the get_system_type() function. If non-NULL, return it as the system type. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/generic')
-rw-r--r--arch/mips/generic/proc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/generic/proc.c b/arch/mips/generic/proc.c
index 4c992809cc3f..cce2fde219a3 100644
--- a/arch/mips/generic/proc.c
+++ b/arch/mips/generic/proc.c
@@ -8,11 +8,16 @@
#include <asm/bootinfo.h>
+char *system_type;
+
const char *get_system_type(void)
{
const char *str;
int err;
+ if (system_type)
+ return system_type;
+
err = of_property_read_string(of_root, "model", &str);
if (!err)
return str;