Rajanikanth H.V 4fd0690bb0 serial: pl011: implement workaround for CTS clear event issue
Problem Observed:
- interrupt status is set by rising or falling edge on CTS line
- interrupt status is cleared on a .0. to .1. transition of the
  interrupt-clear register bit 1.
- interrupt-clear register is reset by hardware once the interrupt
  status is .0..
  Remark: It seems not possible to read this register back by the
  CPU though, but internally this register exists.
- when simultaneous set and reset event on the interrupt status
  happens, then the set-event has priority and the status remains
  .1.. As a result the interrupt-clear register is not reset to
  .0., and no new .0. to .1. transition can be detected on it when
  writing a .1. to it.
  This implies race condition, the clear must be performed at least
  one UARTCLK the riding edge of CTS RIS interrupt.

Fix:
  Instead of resetting UART as done in commit
  c16d51a32bbb61ac8fd96f78b5ce2fccfe0fb4c3
  "amba pl011: workaround for uart registers lockup" do the
  following:

  write .0. and then  .1. to the interrupt-clear register to make
  sure that this transition is detected. According to the datasheet
  writing a .0. does not have any effect, but actually it allows to
  reset the internal interrupt-clear register.

  Take into account:
  The .0. needs to last at least for one clk_uart clock period
  (~ 38 MHz, 26.08ns)

This way we can do away with the tasklet and keep only a tiny
fix triggered by the variant flag introduced in this patch.

Signed-off-by: Guillaume Jaunet <guillaume.jaunet@stericsson.com>
Signed-off-by: Christophe Arnal <christophe.arnal@stericsson.com>
Signed-off-by: Matthias Locher  <Matthias.Locher@stericsson.com>
Signed-off-by: Rajanikanth H.V <rajanikanth.hv@stericsson.com>
Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18 15:06:38 -07:00
..
2012-01-24 12:55:36 -08:00
2012-03-28 18:30:01 +01:00
2012-04-09 11:14:49 -07:00
2012-03-28 18:30:03 +01:00
2012-01-26 11:29:47 -08:00
2012-03-28 18:30:03 +01:00
2011-02-17 11:16:15 -08:00
2011-03-31 11:26:23 -03:00
2012-02-10 10:25:27 -08:00
2011-03-31 11:26:23 -03:00
2011-09-22 16:08:57 -07:00
2011-08-26 11:01:15 -07:00
2012-01-09 14:44:15 -08:00
2012-01-26 17:14:50 -08:00
2012-03-27 16:47:35 -07:00
2011-09-22 16:08:57 -07:00
2012-03-23 17:19:37 -07:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2012-01-26 17:14:50 -08:00
2012-01-26 17:14:50 -08:00
2012-03-28 18:30:03 +01:00