Skip to content

Commit 3b8241f

Browse files
committed
nios2: 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_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>
1 parent 2c8725c commit 3b8241f

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

arch/nios2/Kbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22

3-
obj-y += kernel/ mm/ platform/ boot/dts/
3+
obj-y += kernel/ mm/ platform/
44

55
# for cleaning
66
subdir- += boot

arch/nios2/boot/dts/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
22

3-
obj-y := $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE))
3+
dtb-y := $(addsuffix .dtb, $(CONFIG_BUILTIN_DTB_NAME))
44

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))

arch/nios2/kernel/prom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void __init early_init_devtree(void *params)
3232
}
3333
#endif
3434

35-
#ifdef CONFIG_NIOS2_DTB_SOURCE_BOOL
35+
#ifdef CONFIG_BUILTIN_DTB
3636
if (be32_to_cpu((__be32) *dtb) == OF_DT_HEADER)
3737
params = (void *)__dtb_start;
3838
#endif

arch/nios2/platform/Kconfig.platform

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,20 @@ config NIOS2_DTB_PHYS_ADDR
3535
help
3636
Physical address of a dtb blob.
3737

38-
config NIOS2_DTB_SOURCE_BOOL
38+
config BUILTIN_DTB
3939
bool "Compile and link device tree into kernel image"
4040
depends on !COMPILE_TEST
41+
select GENERIC_BUILTIN_DTB
4142
help
4243
This allows you to specify a dts (device tree source) file
4344
which will be compiled and linked into the kernel image.
4445

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
4849
default ""
4950
help
50-
Absolute path to the device tree source (dts) file describing your
51+
Relative path to the device tree without suffix describing your
5152
system.
5253

5354
comment "Nios II instructions"

0 commit comments

Comments
 (0)