[PATCH 19/27] arm: dts: sunxi: do not renumber if mmc2 does not exist

Yifan Gu me at yifangu.com
Mon Jul 26 01:16:28 CEST 2021


We renumber mmc2 to mmc1 for sunxi devices, but if mmc2 does not exist
dts will not build.

This patch prevents that by checking CONFIG_MMC_SUNXI_SLOT_EXTRA.
---
 arch/arm/dts/sunxi-u-boot.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi
index 06da009fa2..53db622144 100644
--- a/arch/arm/dts/sunxi-u-boot.dtsi
+++ b/arch/arm/dts/sunxi-u-boot.dtsi
@@ -13,7 +13,9 @@
 / {
 	aliases {
 		mmc0 = &mmc0;
+#if CONFIG_MMC_SUNXI_SLOT_EXTRA > 1
 		mmc1 = &mmc2;
+#endif
 	};
 
 	binman: binman {
-- 
2.25.1



More information about the U-Boot mailing list