0001
0002
0003
0004
0005
0006
0007 #include <linux/of.h>
0008
0009 #include <asm/bootinfo.h>
0010
0011 char *system_type;
0012
0013 const char *get_system_type(void)
0014 {
0015 const char *str;
0016 int err;
0017
0018 if (system_type)
0019 return system_type;
0020
0021 err = of_property_read_string(of_root, "model", &str);
0022 if (!err)
0023 return str;
0024
0025 err = of_property_read_string_index(of_root, "compatible", 0, &str);
0026 if (!err)
0027 return str;
0028
0029 return "Unknown";
0030 }