omap3/4: uart: fix full-fifo write abort
authorSantosh Shilimkar <santosh.shilimkar@ti.com>
Thu, 18 Feb 2010 08:59:06 +0000 (08:59 +0000)
committerTony Lindgren <tony@atomide.com>
Tue, 23 Feb 2010 18:57:40 +0000 (10:57 -0800)
commite03d37d85909fd9b09e78087c57b45972a7664ad
tree9c026405e45ee7597eb45c1d596d39952c3888c3
parentae46ec77311b550be992339c1e01fc20bc65296e
omap3/4: uart: fix full-fifo write abort

This patch is addition to the already merged commit on non-empty
uart fifo read abort. "ce13d4716a276f4331d78ba28a5093a63822ab95"

OMAP3630 and OMAP4430 UART IP blocks have a restriction on TX FIFO
too. If you try to write to the tx fifo when it is full, the system aborts.

More details on this thread are here:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg19447.html

This can be easily reproducible by not suppressing interconnect errors or
long duration testing where continuous prints over console from multiple
threads. This patch is addressing the issue by ensuring that write is
not issued while fifo is full. A timeout is added to avoid any hang
on fifo-full for 10 mS which is unlikely case.

Patch is validated on OMAP3630 and OMAP4 SDP.

V2 version removed the additional 1 uS on every TX as per
Tony's suggestion

Signed-off-by: Woodruff Richard <r-woodruff2@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
CC: Ghorai Sukumar <s-ghorai@ti.com>
Reviewed-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/serial.c