[U-Boot] [PATCH] IXP425: Changing serial port initialization sequence Part 1/1

Stefan Althoefer stefan.althoefer at web.de
Thu Dec 4 22:09:53 CET 2008


[PATCH] IXP425: Changing serial port initialization sequence

On my IXP425 board (Janz emPC-A400), the first few characters of
the u-boot startup message were missing.

I fixed it by enabling the UART before all other initialization.

I also enabled (and flushed) the FIFO of the UART.


The patch is against "latest" u-boot git-repository

Please (still) be patient if style of submission or patches are
offending.

Signed-off-by: Stefan Althoefer <stefan.althoefer at web.de>
----

diff -uprN u-boot-orig//cpu/ixp/serial.c u-boot/cpu/ixp/serial.c
--- u-boot-orig//cpu/ixp/serial.c	2008-12-02 17:25:31.000000000 +0100
+++ u-boot/cpu/ixp/serial.c	2008-12-02 22:46:27.000000000 +0100
@@ -50,8 +50,10 @@ void serial_setbrg (void)
 	else
 		hang ();
 
-	IER(uart) = 0;					/* Disable for now */
-	FCR(uart) = 0;					/* No fifos enabled */
+	IER(uart) = IER_UUE;
+
+	/* Enable an clear FIFOs */
+	FCR(uart) = FCR_RESETTF | FCR_RESETRF | FCR_TRFIFOE;
 
 	/* set baud rate */
 	LCR(uart) = LCR_WLS0 | LCR_WLS1 | LCR_DLAB;
@@ -63,7 +65,6 @@ void serial_setbrg (void)
 #else
 	MCR(uart) = 0;					/* set RTS inactive */
 #endif
-	IER(uart) = IER_UUE;
 }
 
 /*


More information about the U-Boot mailing list