[PATCH] sunxi: fix build when CONFIG_UART0_PORT_F is selected
Icenowy Zheng
icenowy at aosc.io
Fri Mar 4 17:06:01 CET 2022
Currently CONFIG_UART0_PORT_F will forbid the build of sunxi-mmc driver,
which leads calls to it in board/sunxi/board.c a undefined reference.
Guard that code in #ifndef to fix build.
Signed-off-by: Icenowy Zheng <icenowy at aosc.io>
---
board/sunxi/board.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 82c52b28f8..8a003d8559 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -539,6 +539,7 @@ int board_mmc_init(struct bd_info *bis)
{
__maybe_unused struct mmc *mmc0, *mmc1;
+#ifndef CONFIG_UART0_PORT_F
mmc_pinmux_setup(CONFIG_MMC_SUNXI_SLOT);
mmc0 = sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT);
if (!mmc0)
@@ -549,6 +550,7 @@ int board_mmc_init(struct bd_info *bis)
mmc1 = sunxi_mmc_init(CONFIG_MMC_SUNXI_SLOT_EXTRA);
if (!mmc1)
return -1;
+#endif
#endif
return 0;
--
2.35.1
More information about the U-Boot
mailing list