sh: Migrate to the generic rule for built-in DTB
Commit 654102df2a
("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 <masahiroy@kernel.org>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
This commit is contained in:
parent
d2a5f10bf1
commit
21bcc49974
|
@ -1,7 +1,6 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
obj-y += kernel/ mm/ boards/
|
obj-y += kernel/ mm/ boards/
|
||||||
obj-$(CONFIG_SH_FPU_EMU) += math-emu/
|
obj-$(CONFIG_SH_FPU_EMU) += math-emu/
|
||||||
obj-$(CONFIG_USE_BUILTIN_DTB) += boot/dts/
|
|
||||||
|
|
||||||
obj-$(CONFIG_HD6446X_SERIES) += cchips/hd6446x/
|
obj-$(CONFIG_HD6446X_SERIES) += cchips/hd6446x/
|
||||||
|
|
||||||
|
|
|
@ -648,10 +648,11 @@ endmenu
|
||||||
|
|
||||||
menu "Boot options"
|
menu "Boot options"
|
||||||
|
|
||||||
config USE_BUILTIN_DTB
|
config BUILTIN_DTB
|
||||||
bool "Use builtin DTB"
|
bool "Use builtin DTB"
|
||||||
default n
|
default n
|
||||||
depends on SH_DEVICE_TREE
|
depends on SH_DEVICE_TREE
|
||||||
|
select GENERIC_BUILTIN_DTB
|
||||||
help
|
help
|
||||||
Link a device tree blob for particular hardware into the kernel,
|
Link a device tree blob for particular hardware into the kernel,
|
||||||
suppressing use of the DTB pointer provided by the bootloader.
|
suppressing use of the DTB pointer provided by the bootloader.
|
||||||
|
@ -659,10 +660,10 @@ config USE_BUILTIN_DTB
|
||||||
not capable of providing a DTB to the kernel, or for experimental
|
not capable of providing a DTB to the kernel, or for experimental
|
||||||
hardware without stable device tree bindings.
|
hardware without stable device tree bindings.
|
||||||
|
|
||||||
config BUILTIN_DTB_SOURCE
|
config BUILTIN_DTB_NAME
|
||||||
string "Source file for builtin DTB"
|
string "Source file for builtin DTB"
|
||||||
default ""
|
default ""
|
||||||
depends on USE_BUILTIN_DTB
|
depends on BUILTIN_DTB
|
||||||
help
|
help
|
||||||
Base name (without suffix, relative to arch/sh/boot/dts) for the
|
Base name (without suffix, relative to arch/sh/boot/dts) for the
|
||||||
a DTS file that will be used to produce the DTB linked into the
|
a DTS file that will be used to produce the DTB linked into the
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
obj-$(CONFIG_USE_BUILTIN_DTB) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_SOURCE))
|
obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .dtb.o, $(CONFIG_BUILTIN_DTB_NAME))
|
||||||
|
|
|
@ -249,7 +249,7 @@ void __ref sh_fdt_init(phys_addr_t dt_phys)
|
||||||
/* Avoid calling an __init function on secondary cpus. */
|
/* Avoid calling an __init function on secondary cpus. */
|
||||||
if (done) return;
|
if (done) return;
|
||||||
|
|
||||||
#ifdef CONFIG_USE_BUILTIN_DTB
|
#ifdef CONFIG_BUILTIN_DTB
|
||||||
dt_virt = __dtb_start;
|
dt_virt = __dtb_start;
|
||||||
#else
|
#else
|
||||||
dt_virt = phys_to_virt(dt_phys);
|
dt_virt = phys_to_virt(dt_phys);
|
||||||
|
@ -323,7 +323,7 @@ void __init setup_arch(char **cmdline_p)
|
||||||
sh_early_platform_driver_probe("earlyprintk", 1, 1);
|
sh_early_platform_driver_probe("earlyprintk", 1, 1);
|
||||||
|
|
||||||
#ifdef CONFIG_OF_EARLY_FLATTREE
|
#ifdef CONFIG_OF_EARLY_FLATTREE
|
||||||
#ifdef CONFIG_USE_BUILTIN_DTB
|
#ifdef CONFIG_BUILTIN_DTB
|
||||||
unflatten_and_copy_device_tree();
|
unflatten_and_copy_device_tree();
|
||||||
#else
|
#else
|
||||||
unflatten_device_tree();
|
unflatten_device_tree();
|
||||||
|
|
Loading…
Reference in New Issue