Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nios2: migrate to the generic rule for built-in DTB

Commit 654102df2ac2 ("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_NIOS2_DTB_SOURCE_BOOL to CONFIG_BUILTIN_DTB, and
CONFIG_NIOS2_DTB_SOURCE to CONFIG_BUILTIN_DTB_NAME.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

+10 -9
+1 -1
arch/nios2/Kbuild
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 3 - obj-y += kernel/ mm/ platform/ boot/dts/ 3 + obj-y += kernel/ mm/ platform/ 4 4 5 5 # for cleaning 6 6 subdir- += boot
+2 -2
arch/nios2/boot/dts/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 2 3 - obj-y := $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE)) 3 + dtb-y := $(addsuffix .dtb, $(CONFIG_BUILTIN_DTB_NAME)) 4 4 5 - dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts)) 5 + dtb-$(CONFIG_OF_ALL_DTBS) += $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts))
+1 -1
arch/nios2/kernel/prom.c
··· 32 32 } 33 33 #endif 34 34 35 - #ifdef CONFIG_NIOS2_DTB_SOURCE_BOOL 35 + #ifdef CONFIG_BUILTIN_DTB 36 36 if (be32_to_cpu((__be32) *dtb) == OF_DT_HEADER) 37 37 params = (void *)__dtb_start; 38 38 #endif
+6 -5
arch/nios2/platform/Kconfig.platform
··· 35 35 help 36 36 Physical address of a dtb blob. 37 37 38 - config NIOS2_DTB_SOURCE_BOOL 38 + config BUILTIN_DTB 39 39 bool "Compile and link device tree into kernel image" 40 40 depends on !COMPILE_TEST 41 + select GENERIC_BUILTIN_DTB 41 42 help 42 43 This allows you to specify a dts (device tree source) file 43 44 which will be compiled and linked into the kernel image. 44 45 45 - config NIOS2_DTB_SOURCE 46 - string "Device tree source file" 47 - depends on NIOS2_DTB_SOURCE_BOOL 46 + config BUILTIN_DTB_NAME 47 + string "Built-in device tree name" 48 + depends on BUILTIN_DTB 48 49 default "" 49 50 help 50 - Absolute path to the device tree source (dts) file describing your 51 + Relative path to the device tree without suffix describing your 51 52 system. 52 53 53 54 comment "Nios II instructions"