Do full flush on uart8250 only at end of printk.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 10 Jul 2011 00:22:21 +0000 (20:22 -0400)
committerPatrick Georgi <patrick@georgi-clan.de>
Tue, 12 Jul 2011 09:36:20 +0000 (11:36 +0200)
commita68555f48d06b4c8d55f7e4ca208805bec3d5512
tree132a21ab3f20d2ca5ce967705d4d92c3c0dbe476
parent537cacfa04c9dc56cd608012a73d95ab342d2f81
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 <kevin@koconnor.net>
Reviewed-on: http://review.coreboot.org/90
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Rudolf Marek <r.marek@assembler.cz>
Reviewed-by: Sven Schnelle <svens@stackframe.org>
src/arch/x86/lib/romstage_console.c
src/console/uart8250_console.c
src/console/uart8250mem_console.c
src/include/uart8250.h
src/lib/uart8250.c
src/lib/uart8250mem.c