summaryrefslogtreecommitdiffstats
path: root/arch/riscv/Kconfig.socs
diff options
context:
space:
mode:
authorDamien Le Moal <damien.lemoal@wdc.com>2020-12-13 22:50:37 +0900
committerPalmer Dabbelt <palmerdabbelt@google.com>2021-01-07 19:00:50 -0800
commitd5805af9fe9ffe4a9d975e9bc39496f57a161076 (patch)
tree129e97f2fe1ef10d94ac1981e9389ae1c1a69388 /arch/riscv/Kconfig.socs
parentd573b5558abb5281306ecb35b41a2814abd8d7e4 (diff)
downloadlinux-d5805af9fe9ffe4a9d975e9bc39496f57a161076.tar.bz2
riscv: Fix builtin DTB handling
All SiPeed K210 MAIX boards have the exact same vendor, arch and implementation IDs, preventing differentiation to select the correct device tree to use through the SOC_BUILTIN_DTB_DECLARE() macro. This result in this macro to be useless and mandates changing the code of the sysctl driver to change the builtin device tree suitable for the target board. Fix this problem by removing the SOC_BUILTIN_DTB_DECLARE() macro since it is used only for the K210 support. The code searching the builtin DTBs using the vendor, arch an implementation IDs is also removed. Support for builtin DTB falls back to the simpler and more traditional handling of builtin DTB using the CONFIG_BUILTIN_DTB option, similarly to other architectures. Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/Kconfig.socs')
-rw-r--r--arch/riscv/Kconfig.socs19
1 files changed, 14 insertions, 5 deletions
diff --git a/arch/riscv/Kconfig.socs b/arch/riscv/Kconfig.socs
index 3284d5c291be..59000675cb9f 100644
--- a/arch/riscv/Kconfig.socs
+++ b/arch/riscv/Kconfig.socs
@@ -32,9 +32,7 @@ config SOC_KENDRYTE
help
This enables support for Kendryte K210 SoC platform hardware.
-config SOC_KENDRYTE_K210_DTB
- def_bool y
- depends on SOC_KENDRYTE_K210_DTB_BUILTIN
+if SOC_KENDRYTE
config SOC_KENDRYTE_K210_DTB_BUILTIN
bool "Builtin device tree for the Kendryte K210"
@@ -42,10 +40,21 @@ config SOC_KENDRYTE_K210_DTB_BUILTIN
default y
select OF
select BUILTIN_DTB
- select SOC_KENDRYTE_K210_DTB
help
- Builds a device tree for the Kendryte K210 into the Linux image.
+ Build a device tree for the Kendryte K210 into the Linux image.
This option should be selected if no bootloader is being used.
If unsure, say Y.
+config SOC_KENDRYTE_K210_DTB_SOURCE
+ string "Source file for the Kendryte K210 builtin DTB"
+ depends on SOC_KENDRYTE
+ depends on SOC_KENDRYTE_K210_DTB_BUILTIN
+ default "k210"
+ help
+ Base name (without suffix, relative to arch/riscv/boot/dts/kendryte)
+ for the DTS file that will be used to produce the DTB linked into the
+ kernel.
+
+endif
+
endmenu