summaryrefslogtreecommitdiff
path: root/arch/sh/kernel
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/kernel
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/kernel')
-rw-r--r--arch/sh/kernel/setup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 5d34605b58b5..5b9eb70311e3 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -251,7 +251,11 @@ void __ref sh_fdt_init(phys_addr_t dt_phys)
/* Avoid calling an __init function on secondary cpus. */
if (done) return;
+#ifdef CONFIG_USE_BUILTIN_DTB
+ dt_virt = __dtb_start;
+#else
dt_virt = phys_to_virt(dt_phys);
+#endif
if (!dt_virt || !early_init_dt_scan(dt_virt)) {
pr_crit("Error: invalid device tree blob"