amba pl011: workaround for uart registers lockup
authorShreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Thu, 9 Jun 2011 20:56:32 +0000 (22:56 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Jul 2011 22:09:23 +0000 (15:09 -0700)
commitdef90f4239f094f3846c108c1c41a4cd55c33e8e
tree4afa3043999cca62d501764456b194db33fea224
parentf086ced17191fa0c5712539d2b680eae3dc972a1
amba pl011: workaround for uart registers lockup

This workaround aims to break the deadlock situation
which raises during continuous transfer of data for long
duration over uart with hardware flow control. It is
observed that CTS interrupt cannot be cleared in uart
interrupt register (ICR). Hence further transfer over
uart gets blocked.

It is seen that during such deadlock condition ICR
don't get cleared even on multiple write. This leads
pass_counter to decrease and finally reach zero. This
can be taken as trigger point to run this UART_BT_WA.

Workaround backups the register configuration, does soft
reset of UART using BIT-0 of PRCC_K_SOFTRST_SET/CLEAR
registers and restores the registers.

This patch also provides support for uart init and exit
function calls if present.

Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/serial/amba-pl011.c
include/linux/amba/serial.h