[PATCH 11/27] sunxi: do not set PF MMC0 pinmux when PF uart is used

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


From: Icenowy Zheng <icenowy at aosc.io>

Signed-off-by: Icenowy Zheng <icenowy at aosc.io>
Signed-off-by: Yifan Gu <me at yifangu.com>
---
 board/sunxi/board.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 27ab44b67c..748c1a8673 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -412,17 +412,19 @@ void board_nand_init(void)
 #ifdef CONFIG_MMC
 static void mmc_pinmux_setup(int sdc)
 {
-	unsigned int pin;
+	__maybe_unused unsigned int pin;
 	__maybe_unused int pins;
 
 	switch (sdc) {
 	case 0:
 		/* SDC0: PF0-PF5 */
+#ifndef CONFIG_UART0_PORT_F
 		for (pin = SUNXI_GPF(0); pin <= SUNXI_GPF(5); pin++) {
 			sunxi_gpio_set_cfgpin(pin, SUNXI_GPF_SDC0);
 			sunxi_gpio_set_pull(pin, SUNXI_GPIO_PULL_UP);
 			sunxi_gpio_set_drv(pin, 2);
 		}
+#endif
 		break;
 
 	case 1:
-- 
2.25.1



More information about the U-Boot mailing list