From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] MIPS: tl-wdr4300: remove debug_uart_init call
Date: Mon, 24 Apr 2017 19:03:33 +0200 [thread overview]
Message-ID: <1493053414-810-4-git-send-email-noltari@gmail.com> (raw)
In-Reply-To: <1493053414-810-1-git-send-email-noltari@gmail.com>
In order to add a generic MIPS debug_uart_init call right before the call to
board_early_init_f, we need to remove all calls to debug_uart_init from every
MIPS boards.
WDR4300 doesn't provide a board_debug_uart_init and configures pinmux in
board_early_init_f instead. Since I have no idead of what's the needed uart
pinmux config, I copied the whole pinmux config to a new function that is
called from board_early_init_f if CONFIG_DEBUG_UART_BOARD_INIT is not enabled.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
v2: No changes.
board/tplink/wdr4300/wdr4300.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/board/tplink/wdr4300/wdr4300.c b/board/tplink/wdr4300/wdr4300.c
index 6e070fd..0f59648 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
--
2.1.4
next prev parent reply other threads:[~2017-04-24 17:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-23 10:50 [U-Boot] [PATCH 0/4] MIPS: call debug_uart_init right before board_init_f Álvaro Fernández Rojas
2017-04-23 10:50 ` [U-Boot] [PATCH 1/4] MIPS: QCA AP121: remove debug_uart_init call Álvaro Fernández Rojas
2017-04-23 10:50 ` [U-Boot] [PATCH 2/4] MIPS: QCA AP143: " Álvaro Fernández Rojas
2017-04-23 10:50 ` [U-Boot] [PATCH 3/4] MIPS: tl-wdr4300: " Álvaro Fernández Rojas
2017-04-23 10:50 ` [U-Boot] [PATCH 4/4] MIPS: call debug_uart_init right before board_init_f Álvaro Fernández Rojas
2017-04-23 11:09 ` Marek Vasut
2017-04-23 11:31 ` Álvaro Fernández Rojas
2017-04-23 11:44 ` Marek Vasut
2017-04-23 12:04 ` Álvaro Fernández Rojas
2017-04-23 17:08 ` Marek Vasut
2017-04-23 19:04 ` Daniel Schwierzeck
2017-04-23 19:40 ` Marek Vasut
2017-04-23 19:09 ` Daniel Schwierzeck
2017-04-24 17:03 ` [U-Boot] [PATCH 0/4] " Álvaro Fernández Rojas
2017-04-24 17:03 ` [U-Boot] [PATCH 1/4] MIPS: QCA AP121: remove debug_uart_init call Álvaro Fernández Rojas
2017-04-30 18:22 ` Daniel Schwierzeck
2017-04-24 17:03 ` [U-Boot] [PATCH 2/4] MIPS: QCA AP143: " Álvaro Fernández Rojas
2017-04-30 18:22 ` Daniel Schwierzeck
2017-04-24 17:03 ` Álvaro Fernández Rojas [this message]
2017-04-30 18:22 ` [U-Boot] [PATCH 3/4] MIPS: tl-wdr4300: " Daniel Schwierzeck
2017-04-24 17:03 ` [U-Boot] [PATCH 4/4] MIPS: call debug_uart_init right before board_init_f Álvaro Fernández Rojas
2017-04-30 18:22 ` Daniel Schwierzeck
2017-04-25 15:48 ` [U-Boot] [PATCH 0/4] " Álvaro Fernández Rojas
2017-04-25 16:32 ` Daniel Schwierzeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1493053414-810-4-git-send-email-noltari@gmail.com \
--to=noltari@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox