linux/arch/powerpc
Andrew Klossner af9c724907 powerpc/udbg: Fix lost byte during console handover; change LFCR to CRLF
When the console is on a serial port to be driven by serial8250, a
character can be lost from the end of the first line in the two-line
sequence

	serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 42) is a 16550A
	console handover: boot [udbg0] -> real [ttyS0]

This happens because udbg_puts or udbg_write stuff the last byte of
the line into the Tx FIFO and return, whereupon the serial8250
initialization code immediately empties that FIFO.  The fix: udbg_puts
and udbg_write now wait for the Tx FIFO to clear before returning.
This delays the system by one additional serial frame time for each
line written by udbg, but the effect is not noticeable, a cumulative
17 milliseconds for 200 lines of early printk output at 115200 baud.

Also, the routines in udbg_16550.c now emit CRLF instead of LFCR.
Linux makes a point of emitting CRLF because, when serial output is
captured to a file, LFCR sequences can confuse text editors.  See
http://lkml.org/lkml/2006/2/4/50 for some history.

Signed-off-by: Andrew Klossner <andrew@cesa.opbu.xerox.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-03-11 17:11:34 +11:00
..
boot Merge commit 'gcl/next' into next 2009-03-11 17:10:00 +11:00
configs Merge commit 'gcl/next' into next 2009-03-11 17:10:00 +11:00
include/asm powerpc/udbg: Fix lost byte during console handover; change LFCR to CRLF 2009-03-11 17:11:34 +11:00
kernel powerpc/udbg: Fix lost byte during console handover; change LFCR to CRLF 2009-03-11 17:11:34 +11:00
kvm KVM: Add kvm_arch_sync_events to sync with asynchronize events 2009-02-15 02:47:36 +02:00
lib Merge commit 'origin/master' into next 2009-03-11 17:10:07 +11:00
math-emu powerpc: Add SPE/EFP math emulation for E500v1/v2 processors. 2008-12-03 08:19:16 -06:00
mm powerpc: Wire up /proc/vmallocinfo to our ioremap() 2009-03-11 17:10:14 +11:00
oprofile powerpc/oprofile: G4 oprofile has variable number of counters 2009-03-11 17:10:16 +11:00
platforms powerpc/cell: Fix Axon MSI driver dependencies 2009-03-11 17:11:33 +11:00
sysdev Merge commit 'origin/master' into next 2009-03-11 17:10:07 +11:00
xmon powerpc: Prepare xmon_save_regs for use with kdump 2008-12-23 15:13:28 +11:00
Kconfig Merge commit 'jwb/next' into next 2009-03-03 13:30:03 +11:00
Kconfig.debug powerpc: Allow the max stack trace depth to be configured 2008-12-03 20:46:35 +11:00
Makefile powerpc: Remove unncessary SPE related compiler flag 2008-12-03 08:19:10 -06:00