summaryrefslogtreecommitdiff
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorRich Felker <dalias@libc.org>2016-03-26 01:24:30 +0000
committerRich Felker <dalias@libc.org>2016-07-31 03:33:32 +0000
commit190fe191cfbead9fe089453dd092869c9469c6d4 (patch)
tree10dfa2b780644c5fe43b3cf53901ac4a04963384 /arch/sh/boards
parentff18143ceed3424b7d6cdb8659b9692fa734f0d8 (diff)
sh: add support for linking a builtin device tree blob in the kernel
Signed-off-by: Rich Felker <dalias@libc.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/of-generic.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c
index 911ffb9f115b..1fb6d5714bae 100644
--- a/arch/sh/boards/of-generic.c
+++ b/arch/sh/boards/of-generic.c
@@ -124,13 +124,22 @@ static void __init sh_of_time_init(void)
static void __init sh_of_setup(char **cmdline_p)
{
+ struct device_node *root;
+
+#ifdef CONFIG_USE_BUILTIN_DTB
+ unflatten_and_copy_device_tree();
+#else
unflatten_device_tree();
+#endif
board_time_init = sh_of_time_init;
- sh_mv.mv_name = of_flat_dt_get_machine_name();
- if (!sh_mv.mv_name)
- sh_mv.mv_name = "Unknown SH model";
+ sh_mv.mv_name = "Unknown SH model";
+ root = of_find_node_by_path("/");
+ if (root) {
+ of_property_read_string(root, "model", &sh_mv.mv_name);
+ of_node_put(root);
+ }
sh_of_smp_probe();
}