diff mbox series

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

Message ID 20210725231636.879913-20-me@yifangu.com
State Superseded
Delegated to: Andre Przywara
Headers show
Series Add F1C100s based PocketGo handheld support | expand

Commit Message

Yifan Gu July 25, 2021, 11:16 p.m. UTC
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(+)

Comments

Icenowy Zheng July 26, 2021, 1:01 a.m. UTC | #1
在 2021-07-25星期日的 19:16 -0400,Yifan Gu写道:
> 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.

I have a similar patch at
https://patchwork.ozlabs.org/project/uboot/patch/20210722063015.421923-3-icenowy@sipeed.com/

> ---
>  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 {
diff mbox series

Patch

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 {