[PATCH v2] riscv: fix build failure with Canaan K210 SoC

Damien Le Moal damien.lemoal at wdc.com
Wed Jan 13 04:43:53 EST 2021


Fix riscv dts main Makefile to avoid build failures when
CONFIG_SOC_CANAAN is selected but CONFIG_SOC_CANAAN_K210_DTB_BUILTIN is
not set. In this case, the SoC device tree should not be built.
Avoid the failure by changing the canaan subdir inclusion based on the
CONFIG_SOC_CANAAN_K210_DTB_BUILTIN configuration option value instead
of on the value of the CONFIG_SOC_CANAAN configuration option.

Reported-by: kernel test robot <lkp at intel.com>
Fixes: 3c54e3125dcd ("riscv: Use vendor name for K210 SoC support")
Signed-off-by: Damien Le Moal <damien.lemoal at wdc.com>
---
Changes from v1:
* Add missing CONFIG_ prefix to SOC_CANAAN_K210_DTB_BUILTIN option

 arch/riscv/boot/dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Makefile
index 4da40691c55b..7ffd502e3e7b 100644
--- a/arch/riscv/boot/dts/Makefile
+++ b/arch/riscv/boot/dts/Makefile
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: GPL-2.0
 subdir-y += sifive
-subdir-$(CONFIG_SOC_CANAAN) += canaan
+subdir-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) += canaan
 
 obj-$(CONFIG_BUILTIN_DTB) := $(addsuffix /, $(subdir-y))
-- 
2.29.2




More information about the linux-riscv mailing list