summaryrefslogtreecommitdiff
path: root/board/tplink/wdr4300/wdr4300.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/tplink/wdr4300/wdr4300.c')
-rw-r--r--board/tplink/wdr4300/wdr4300.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index 6e070fd558..0f59648b1f 100644
--- a/board/tplink/wdr4300/wdr4300.c
+++ b/board/tplink/wdr4300/wdr4300.c
@@ -34,8 +34,7 @@ static void wdr4300_usb_start(void)
static inline void wdr4300_usb_start(void) {}
#endif
-#ifdef CONFIG_BOARD_EARLY_INIT_F
-int board_early_init_f(void)
+void wdr4300_pinmux_config(void)
{
void __iomem *regs;
@@ -56,9 +55,20 @@ int board_early_init_f(void)
writel(0x00000000, regs + AR934X_GPIO_REG_OUT_FUNC3);
writel(0x0000004d, regs + AR934X_GPIO_REG_OUT_FUNC4);
writel(0x00000000, regs + AR934X_GPIO_REG_OUT_FUNC5);
+}
+
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
+{
+ wdr4300_pinmux_config();
+}
+#endif
-#ifdef CONFIG_DEBUG_UART
- debug_uart_init();
+#ifdef CONFIG_BOARD_EARLY_INIT_F
+int board_early_init_f(void)
+{
+#ifndef CONFIG_DEBUG_UART_BOARD_INIT
+ wdr4300_pinmux_config();
#endif
#ifndef CONFIG_SKIP_LOWLEVEL_INIT