aboutsummaryrefslogtreecommitdiffstats
path: root/tty
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2009-11-06 15:33:47 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-11-06 15:33:47 -0800
commit7106234213fae9f7169ff0f17b8befc30ca03583 (patch)
treee765b56267b62c7b78261dc3e39de75d89ef2c49 /tty
parentf878c4f193b7327244af8f7de8cf8bc61fb78fe1 (diff)
downloadpatches-7106234213fae9f7169ff0f17b8befc30ca03583.tar.gz
lots o patches
Diffstat (limited to 'tty')
-rw-r--r--tty/serial-pxa-work-around-errata-75.patch72
-rw-r--r--tty/tty-docs-serial-tty-add-to-ldisc-methods.patch54
2 files changed, 126 insertions, 0 deletions
diff --git a/tty/serial-pxa-work-around-errata-75.patch b/tty/serial-pxa-work-around-errata-75.patch
new file mode 100644
index 00000000000000..5bbc5129f91d7a
--- /dev/null
+++ b/tty/serial-pxa-work-around-errata-75.patch
@@ -0,0 +1,72 @@
+From u.kleine-koenig@pengutronix.de Fri Nov 6 14:56:26 2009
+From: Uwe Kleine-K�nig <u.kleine-koenig@pengutronix.de>
+Date: Fri, 6 Nov 2009 21:40:46 +0100
+Subject: Serial: pxa: work around Errata #75
+Cc: Eric Miao <eric.y.miao@gmail.com>, Alan Cox <alan@linux.intel.com>, Mike Rapoport <mike@compulab.co.il>, Greg Kroah-Hartman <gregkh@suse.de>
+Message-ID: <20091106204046.GA8952@pengutronix.de>
+
+From: Uwe Kleine-K�nig <u.kleine-koenig@pengutronix.de>
+
+Intel(R) PXA27x Processor Family Specification Update (Nov 2005)
+says:
+
+ E75. UART: Baud rate may not be programmed correctly on
+ back-to-back writes.
+
+ Problem:
+ When programming the Divisor Latch registers, Low and High (DLL and
+ DLH), with back-to-back writes, the second register write may not
+ take effect. The result is an incorrect baud rate.
+
+ Workaround:
+ After programming the first Divisor Latch register, read and verify
+ it before programming the second Divisor Latch register.
+
+This was hit when changing the baud rate from 115200 to 9600 while
+receiving characters at 9600 Bd.
+
+And fixed indention of some comments nearby.
+
+Signed-off-by: Uwe Kleine-K�nig <u.kleine-koenig@pengutronix.de>
+Acked-by: Wolfram Sang <w.sang@pengutronix.de>
+Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Cc: Eric Miao <eric.y.miao@gmail.com>
+Cc: Alan Cox <alan@linux.intel.com>
+Cc: Mike Rapoport <mike@compulab.co.il>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/serial/pxa.c | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+--- a/drivers/serial/pxa.c
++++ b/drivers/serial/pxa.c
+@@ -438,6 +438,7 @@ serial_pxa_set_termios(struct uart_port
+ unsigned char cval, fcr = 0;
+ unsigned long flags;
+ unsigned int baud, quot;
++ unsigned int dll;
+
+ switch (termios->c_cflag & CSIZE) {
+ case CS5:
+@@ -534,10 +535,18 @@ serial_pxa_set_termios(struct uart_port
+ else
+ up->mcr &= ~UART_MCR_AFE;
+
+- serial_out(up, UART_LCR, cval | UART_LCR_DLAB);/* set DLAB */
++ serial_out(up, UART_LCR, cval | UART_LCR_DLAB); /* set DLAB */
+ serial_out(up, UART_DLL, quot & 0xff); /* LS of divisor */
++
++ /*
++ * work around Errata #75 according to Intel(R) PXA27x Processor Family
++ * Specification Update (Nov 2005)
++ */
++ dll = serial_in(up, UART_DLL);
++ WARN_ON(dll != (quot & 0xff));
++
+ serial_out(up, UART_DLM, quot >> 8); /* MS of divisor */
+- serial_out(up, UART_LCR, cval); /* reset DLAB */
++ serial_out(up, UART_LCR, cval); /* reset DLAB */
+ up->lcr = cval; /* Save LCR */
+ serial_pxa_set_mctrl(&up->port, up->port.mctrl);
+ serial_out(up, UART_FCR, fcr);
diff --git a/tty/tty-docs-serial-tty-add-to-ldisc-methods.patch b/tty/tty-docs-serial-tty-add-to-ldisc-methods.patch
new file mode 100644
index 00000000000000..12e434fcb51ac8
--- /dev/null
+++ b/tty/tty-docs-serial-tty-add-to-ldisc-methods.patch
@@ -0,0 +1,54 @@
+From rdunlap@xenotime.net Fri Nov 6 14:50:42 2009
+From: Randy Dunlap <rdunlap@xenotime.net>
+Date: Wed, 04 Nov 2009 16:04:52 -0800
+Subject: tty: docs: serial/tty, add to ldisc methods
+Cc: Tilman Schmidt <tilman@imap.cc>
+Cc: Greg Kroah-Hartman <gregkh@suse.de>
+Message-ID: <12573794921501@xenotime.net>
+
+
+From: Tilman Schmidt <tilman@imap.cc>
+
+A small addition to the ldisc method descriptions.
+
+Signed-off-by: Tilman Schmidt <tilman@imap.cc>
+Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
+Acked-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/serial/tty.txt | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+--- a/Documentation/serial/tty.txt
++++ b/Documentation/serial/tty.txt
+@@ -42,7 +42,8 @@ TTY side interfaces:
+ open() - Called when the line discipline is attached to
+ the terminal. No other call into the line
+ discipline for this tty will occur until it
+- completes successfully. Can sleep.
++ completes successfully. Returning an error will
++ prevent the ldisc from being attached. Can sleep.
+
+ close() - This is called on a terminal when the line
+ discipline is being unplugged. At the point of
+@@ -52,7 +53,7 @@ close() - This is called on a terminal
+ hangup() - Called when the tty line is hung up.
+ The line discipline should cease I/O to the tty.
+ No further calls into the ldisc code will occur.
+- Can sleep.
++ The return value is ignored. Can sleep.
+
+ write() - A process is writing data through the line
+ discipline. Multiple write calls are serialized
+@@ -83,6 +84,10 @@ ioctl() - Called when an ioctl is hande
+ that might be for the ldisc. Multiple ioctl calls
+ may occur in parallel. May sleep.
+
++compat_ioctl() - Called when a 32 bit ioctl is handed to the tty layer
++ that might be for the ldisc. Multiple ioctl calls
++ may occur in parallel. May sleep.
++
+ Driver Side Interfaces:
+
+ receive_buf() - Hand buffers of bytes from the driver to the ldisc