[PATCH v2 06/23] sunxi: Skip non-DM UART pin setup when PINCTRL=y

Samuel Holland
2022-03-18T03:55:37Z

When a pinctrl driver is available, it will take care of setting up
these pins. However, for now this code is still needed in SPL.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
---

(no changes since v1)

arch/arm/mach-sunxi/board.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 0071de19ff..32e2477ae7 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -79,6 +79,7 @@ ulong board_get_usable_ram_top(ulong total_size)
static int gpio_init(void)
{
__maybe_unused uint val;
+#if !CONFIG_IS_ENABLED(PINCTRL)
#if CONFIG_CONS_INDEX == 1 && defined(CONFIG_UART0_PORT_F)
#if defined(CONFIG_MACH_SUN4I) || \
defined(CONFIG_MACH_SUN7I) || \
@@ -166,6 +167,7 @@ static int gpio_init(void)
#else
#error Unsupported console port number. Please fix pin mux settings in board.c
#endif
+#endif

#ifdef CONFIG_SUN50I_GEN_H6
/* Update PIO power bias configuration by copy hardware detected value */
--
2.33.1