diff mbox series

[U-Boot,2/5] ARM: legoev3: Move UART enable to early init

Message ID 20180520042507.22058-3-david@lechnology.com
State Accepted
Commit 648e87a1ec961de00ac0d7dcbd15b2ff1804ef8d
Delegated to: Tom Rini
Headers show
Series ARM: legoev3: updates | expand

Commit Message

David Lechner May 20, 2018, 4:25 a.m. UTC
This moves the UART init for LEGO MINDSTORMS EV3 to board_early_init_f().
Some console messages were not being printed because the UART was not
enabled until later in the init process.

Signed-off-by: David Lechner <david@lechnology.com>
---
 board/lego/ev3/legoev3.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Tom Rini June 6, 2018, 11:15 a.m. UTC | #1
On Sat, May 19, 2018 at 11:25:04PM -0500, David Lechner wrote:

> This moves the UART init for LEGO MINDSTORMS EV3 to board_early_init_f().
> Some console messages were not being printed because the UART was not
> enabled until later in the init process.
> 
> Signed-off-by: David Lechner <david@lechnology.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/board/lego/ev3/legoev3.c b/board/lego/ev3/legoev3.c
index 5e70363588..69010055d3 100644
--- a/board/lego/ev3/legoev3.c
+++ b/board/lego/ev3/legoev3.c
@@ -132,6 +132,11 @@  void get_board_serial(struct tag_serialnr *serialnr)
 
 int board_early_init_f(void)
 {
+	/* enable the console UART */
+	writel((DAVINCI_UART_PWREMU_MGMT_FREE | DAVINCI_UART_PWREMU_MGMT_URRST |
+		DAVINCI_UART_PWREMU_MGMT_UTRST),
+	       &davinci_uart1_ctrl_regs->pwremu_mgmt);
+
 	/*
 	 * Power on required peripherals
 	 * ARM does not have access by default to PSC0 and PSC1
@@ -166,10 +171,5 @@  int board_init(void)
 	if (davinci_configure_pin_mux_items(pinmuxes, ARRAY_SIZE(pinmuxes)))
 		return 1;
 
-	/* enable the console UART */
-	writel((DAVINCI_UART_PWREMU_MGMT_FREE | DAVINCI_UART_PWREMU_MGMT_URRST |
-		DAVINCI_UART_PWREMU_MGMT_UTRST),
-	       &davinci_uart1_ctrl_regs->pwremu_mgmt);
-
 	return 0;
 }