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

Thomas Chou thomas at wytron.com.tw
Wed Dec 30 13:32:49 CET 2015


Set up the debug UART early if enabled, so that it is ready to use.

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

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 at h)
+	ori	r2, r2, %lo(debug_uart_init at h)
+	callr	r2
+#endif
+
 	/* Allocate and zero GD, update SP */
 	mov	r4, sp
 	movhi	r2, %hi(board_init_f_mem at h)
-- 
2.5.0



More information about the U-Boot mailing list