]> git.baikalelectronics.ru Git - kernel.git/commit
serial: add irq handler for Freescale 16550 errata.
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 4 Dec 2011 23:42:23 +0000 (18:42 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 10 Dec 2011 03:14:13 +0000 (19:14 -0800)
commitba6ad9fd7ff889dc0bb36529cf8ab92c61bec605
tree938b41e9c534582f9152386ce1ee6893c3274c6b
parent4b9f20f36aaa9c8a7155e25edf1623a5f4213a4c
serial: add irq handler for Freescale 16550 errata.

Sending a break on the SOC UARTs found in some MPC83xx/85xx/86xx
chips seems to cause a short lived IRQ storm (/proc/interrupts
typically shows somewhere between 300 and 1500 events).  Unfortunately
this renders SysRQ over the serial console completely inoperable.

The suggested workaround in the errata is to read the Rx register,
wait one character period, and then read the Rx register again.
We achieve this by tracking the old LSR value, and on the subsequent
interrupt event after a break, we don't read LSR, instead we just
read the RBR again and return immediately.

The "fsl,ns16550" is used in the compatible field of the serial
device to mark UARTs known to have this issue.

Thanks to Scott Wood for providing the errata data which led to
a much cleaner fix.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/powerpc/kernel/legacy_serial.c
drivers/tty/serial/8250_fsl.c [new file with mode: 0644]
drivers/tty/serial/Kconfig
drivers/tty/serial/Makefile
include/linux/serial_8250.h