Skip to content

Commit 21bcc49

Browse files
masahir0yglaubitz
authored andcommitted
sh: Migrate to the generic rule for built-in DTB
Commit 654102d ("kbuild: add generic support for built-in boot DTBs") introduced generic support for built-in DTBs. Select GENERIC_BUILTIN_DTB when built-in DTB support is enabled. To keep consistency across architectures, this commit also renames CONFIG_USE_BUILTIN_DTB to CONFIG_BUILTIN_DTB, and CONFIG_BUILTIN_DTB_SOURCE to CONFIG_BUILTIN_DTB_NAME. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: John Paul Adrian Glaubitz <[email protected]> Signed-off-by: John Paul Adrian Glaubitz <[email protected]>
1 parent d2a5f10 commit 21bcc49

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

arch/sh/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
obj-y += kernel/ mm/ boards/
33
obj-$(CONFIG_SH_FPU_EMU) += math-emu/
4-
obj-$(CONFIG_USE_BUILTIN_DTB) += boot/dts/
54

65
obj-$(CONFIG_HD6446X_SERIES) += cchips/hd6446x/
76

arch/sh/Kconfig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,21 +648,22 @@ endmenu
648648

649649
menu "Boot options"
650650

651-
config USE_BUILTIN_DTB
651+
config BUILTIN_DTB
652652
bool "Use builtin DTB"
653653
default n
654654
depends on SH_DEVICE_TREE
655+
select GENERIC_BUILTIN_DTB
655656
help
656657
Link a device tree blob for particular hardware into the kernel,
657658
suppressing use of the DTB pointer provided by the bootloader.
658659
This option should only be used with legacy bootloaders that are
659660
not capable of providing a DTB to the kernel, or for experimental
660661
hardware without stable device tree bindings.
661662

662-
config BUILTIN_DTB_SOURCE
663+
config BUILTIN_DTB_NAME
663664
string "Source file for builtin DTB"
664665
default ""
665-
depends on USE_BUILTIN_DTB
666+
depends on BUILTIN_DTB
666667
help
667668
Base name (without suffix, relative to arch/sh/boot/dts) for the
668669
a DTS file that will be used to produce the DTB linked into the

arch/sh/boot/dts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
obj-$(CONFIG_USE_BUILTIN_DTB) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE))
2+
obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_NAME))

arch/sh/kernel/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ void __ref sh_fdt_init(phys_addr_t dt_phys)
249249
/* Avoid calling an __init function on secondary cpus. */
250250
if (done) return;
251251

252-
#ifdef CONFIG_USE_BUILTIN_DTB
252+
#ifdef CONFIG_BUILTIN_DTB
253253
dt_virt = __dtb_start;
254254
#else
255255
dt_virt = phys_to_virt(dt_phys);
@@ -323,7 +323,7 @@ void __init setup_arch(char **cmdline_p)
323323
sh_early_platform_driver_probe("earlyprintk", 1, 1);
324324

325325
#ifdef CONFIG_OF_EARLY_FLATTREE
326-
#ifdef CONFIG_USE_BUILTIN_DTB
326+
#ifdef CONFIG_BUILTIN_DTB
327327
unflatten_and_copy_device_tree();
328328
#else
329329
unflatten_device_tree();

0 commit comments

Comments
 (0)