linux-stable/drivers/tty
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
  c16d51a32b
  "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
..
hvc TTY: hvc, fix TTY refcounting 2012-04-13 10:54:43 -07:00
ipwireless TTY: ipwireless, use tty from tty_port 2012-04-09 11:30:39 -07:00
serial serial: pl011: implement workaround for CTS clear event issue 2012-04-18 15:06:38 -07:00
vt tty/vt: handle bad user buffer in {G,P}IO_CMAP ioctl 2012-04-09 12:10:23 -07:00
amiserial.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
bfin_jtag_comm.c TTY: bfin_jtag_comm, use tty from tty_port 2012-04-09 11:28:18 -07:00
cyclades.c TTY: remove unneeded tty->index checks 2012-03-08 11:42:21 -08:00
ehv_bytechan.c TTY: remove re-assignments to tty_driver members 2012-03-08 11:37:58 -08:00
isicom.c Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
Kconfig tty/powerpc: early udbg consoles can't be modules 2012-02-24 16:11:50 -08:00
Makefile
moxa.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
moxa.h
mxser.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
mxser.h
n_gsm.c TTY: remove re-assignments to tty_driver members 2012-03-08 11:37:58 -08:00
n_hdlc.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
nozomi.c TTY: remove re-assignments to tty_driver members 2012-03-08 11:37:58 -08:00
pty.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
rocket.c TTY: remove unneeded tty->index checks 2012-03-08 11:42:21 -08:00
rocket.h
rocket_int.h
synclink.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
synclink_gt.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
synclinkmp.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
sysrq.c sysrq: use SEND_SIG_FORCED instead of force_sig() 2012-04-05 15:25:50 -07:00
tty_audit.c
tty_buffer.c tty: hold lock across tty buffer finding and buffer filling 2012-04-09 12:12:45 -07:00
tty_io.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
tty_ioctl.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
tty_ldisc.c Merge 3.2-rc3 into tty-next to handle merge conflict in tty_ldisc.c 2011-11-26 20:07:25 -08:00
tty_mutex.c
tty_port.c TTY: fix UV serial console regression 2012-01-24 12:55:37 -08:00