projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24662c1
)
arch/arm: Add model string to cpuinfo
author
Phil Elwell
<phil@raspberrypi.org>
Tue, 3 Sep 2019 17:16:56 +0000
(18:16 +0100)
committer
popcornmix
<popcornmix@gmail.com>
Wed, 27 Jan 2021 19:13:02 +0000
(19:13 +0000)
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
arch/arm/kernel/setup.c
patch
|
blob
|
history
diff --git
a/arch/arm/kernel/setup.c
b/arch/arm/kernel/setup.c
index 3f65d0ac9f632b4c37fbc214379de71eb5a5875a..6f39d21f42541f08f2874a6aabe3b6804c9591d4 100644
(file)
--- a/
arch/arm/kernel/setup.c
+++ b/
arch/arm/kernel/setup.c
@@
-1244,6
+1244,8
@@
static int c_show(struct seq_file *m, void *v)
{
int i, j;
u32 cpuid;
+ struct device_node *np;
+ const char *model;
for_each_online_cpu(i) {
/*
@@
-1303,6
+1305,14
@@
static int c_show(struct seq_file *m, void *v)
seq_printf(m, "Revision\t: %04x\n", system_rev);
seq_printf(m, "Serial\t\t: %s\n", system_serial);
+ np = of_find_node_by_path("/");
+ if (np) {
+ if (!of_property_read_string(np, "model",
+ &model))
+ seq_printf(m, "Model\t\t: %s\n", model);
+ of_node_put(np);
+ }
+
return 0;
}