diff mbox series

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

Message ID 20211021045540.31578-7-samuel@sholland.org
State RFC
Delegated to: Andre Przywara
Headers show
Series sunxi: Add and use a pinctrl driver | expand

Commit Message

Samuel Holland Oct. 21, 2021, 4:55 a.m. UTC
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.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---

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

Comments

Simon Glass Oct. 24, 2021, 7:53 p.m. UTC | #1
On Wed, 20 Oct 2021 at 22:55, Samuel Holland <samuel@sholland.org> wrote:
>
> 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.
>
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
>
>  arch/arm/mach-sunxi/board.c | 2 ++
>  1 file changed, 2 insertions(+)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index b4ba2a72c4..59febc3ac1 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -78,6 +78,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) || \
@@ -160,6 +161,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 */