[U-Boot-Users] PATCH: ixp42x UART: support 230400bps, enable RTS

Michael Schwingen rincewind at discworld.dascon.de
Sun Dec 9 18:00:35 CET 2007


On Sat, Dec 08, 2007 at 04:32:45PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> 	2 points about this patch
> 
> 	1) I will send a patch to support all baud rates for ipx42x, ixp45x and ixp46x
> 
> 	2) Cou you make the RTS part configurable by a MACRO like
> 	CONFIG_SERIAL_RTS?

Okay - how about this:

Signed-off-by: Michael Schwingen <michael at schwingen.org>

diff --git a/cpu/ixp/serial.c b/cpu/ixp/serial.c
index 62b1f24..190641a 100644
--- a/cpu/ixp/serial.c
+++ b/cpu/ixp/serial.c
@@ -63,8 +63,11 @@ void serial_setbrg (void)
 	DLL(uart) = quot & 0xff;
 	DLH(uart) = quot >> 8;
 	LCR(uart) = LCR_WLS0 | LCR_WLS1;
+#ifdef CONFIG_SERIAL_RTS_ACTIVE
 	MCR(uart) = MCR_RTS;				/* set RTS active */
-
+#else
+	MCR(uart) = 0;					/* set RTS inactive */
+#endif
 	IER(uart) = IER_UUE;
 }
 
This also adds code to initialize RTS to off in case you did not set
CONFIG_SERIAL_RTS_ACTIVE.

cu
Michael




More information about the U-Boot mailing list