From a68555f48d06b4c8d55f7e4ca208805bec3d5512 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 9 Jul 2011 20:22:21 -0400 Subject: Do full flush on uart8250 only at end of printk. The previous code does a full flush of the uart after every character. Unfortunately, this can cause transmission delays on some serial ports. This patch changes the code so that it does a flush at the end of every printk instead of at the end of every character. This reduces the time it takes to transmit serial messages (up to 9% on my Asrock e350m1 board). It also makes the transmission time more consistent which is important when performing timing tests via serial transmissions. Change-Id: I6b28488b905da68c6d68d7c517cc743cde567d70 Signed-off-by: Kevin O'Connor Reviewed-on: http://review.coreboot.org/90 Reviewed-by: Stefan Reinauer Tested-by: build bot (Jenkins) Reviewed-by: Rudolf Marek Reviewed-by: Sven Schnelle --- src/include/uart8250.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include') diff --git a/src/include/uart8250.h b/src/include/uart8250.h index bbf2d8c8a9..4a02179210 100644 --- a/src/include/uart8250.h +++ b/src/include/uart8250.h @@ -131,6 +131,7 @@ unsigned char uart8250_rx_byte(unsigned base_port); int uart8250_can_rx_byte(unsigned base_port); void uart8250_tx_byte(unsigned base_port, unsigned char data); +void uart8250_tx_flush(unsigned base_port); /* Yes it is silly to have three different uart init functions. But we used to * have three different sets of uart code, so it's an improvement. @@ -142,6 +143,7 @@ void uart_init(void); unsigned char uart8250_mem_rx_byte(unsigned base_port); int uart8250_mem_can_rx_byte(unsigned base_port); void uart8250_mem_tx_byte(unsigned base_port, unsigned char data); +void uart8250_mem_tx_flush(unsigned base_port); void uart8250_mem_init(unsigned base_port, unsigned divisor); u32 uart_mem_init(void); -- cgit v1.2.3