diff mbox

[U-Boot] nios2: set up the debug UART early

Message ID 1451478769-22471-1-git-send-email-thomas@wytron.com.tw
State Accepted, archived
Delegated to: Thomas Chou
Headers show

Commit Message

Thomas Chou Dec. 30, 2015, 12:32 p.m. UTC
Set up the debug UART early if enabled, so that it is ready to use.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 arch/nios2/cpu/start.S | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Chin Liang See Dec. 31, 2015, 1:50 a.m. UTC | #1
On Wed, 2015-12-30 at 20:32 +0800, Thomas Chou wrote:
> Set up the debug UART early if enabled, so that it is ready to use.
> 
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
>  arch/nios2/cpu/start.S | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> 

Acked-by: Chin Liang See <clsee@altera.com>

Thanks
Chin Liang
Thomas Chou Feb. 6, 2016, 7:04 a.m. UTC | #2
On 2015年12月30日 20:32, Thomas Chou wrote:
> Set up the debug UART early if enabled, so that it is ready to use.
>
> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
> ---
>   arch/nios2/cpu/start.S | 7 +++++++
>   1 file changed, 7 insertions(+)
>

Applied to u-boot-nios.
diff mbox

Patch

diff --git a/arch/nios2/cpu/start.S b/arch/nios2/cpu/start.S
index 54787c5..1caee0c 100644
--- a/arch/nios2/cpu/start.S
+++ b/arch/nios2/cpu/start.S
@@ -106,6 +106,13 @@  _reloc:
 	stw	r0, 4(sp)
 	mov	fp, sp
 
+#ifdef CONFIG_DEBUG_UART
+	/* Set up the debug UART */
+	movhi	r2, %hi(debug_uart_init@h)
+	ori	r2, r2, %lo(debug_uart_init@h)
+	callr	r2
+#endif
+
 	/* Allocate and zero GD, update SP */
 	mov	r4, sp
 	movhi	r2, %hi(board_init_f_mem@h)