Skip to content

Commit ec7c2a1

Browse files
kelvincheungtsbogend
authored andcommitted
MIPS: loongson: Add built-in DTB support
Since the current bootloader for Loongson-1 does not support FDT, introduce CONFIG_BUILTIN_DTB_NAME to enable a built-in DTB. Signed-off-by: Keguang Zhang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 1174121 commit ec7c2a1

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

arch/mips/boot/dts/loongson/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# SPDX-License-Identifier: GPL-2.0
2+
3+
ifneq ($(CONFIG_BUILTIN_DTB_NAME),)
4+
dtb-y := $(addsuffix .dtb, $(CONFIG_BUILTIN_DTB_NAME))
5+
else
26
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64_2core_2k1000.dtb
37
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_4core_ls7a.dtb
48
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_4core_rs780e.dtb
@@ -10,3 +14,4 @@ dtb-$(CONFIG_MACH_LOONGSON32) += cq-t300b.dtb
1014
dtb-$(CONFIG_MACH_LOONGSON32) += ls1b-demo.dtb
1115
dtb-$(CONFIG_MACH_LOONGSON32) += lsgz_1b_dev.dtb
1216
dtb-$(CONFIG_MACH_LOONGSON32) += smartloong-1c.dtb
17+
endif

arch/mips/loongson32/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,11 @@ config LOONGSON1_LS1C
3636
endchoice
3737

3838
endif # MACH_LOONGSON32
39+
40+
config BUILTIN_DTB_NAME
41+
string "Source file for built-in DTB"
42+
depends on BUILTIN_DTB
43+
help
44+
Base name (without suffix, relative to arch/mips/boot/dts/loongson)
45+
for the DTS file that will be used to produce the DTB linked into
46+
the kernel.

0 commit comments

Comments
 (0)