aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-04 17:41:03 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-04 17:41:03 -0400
commit5ac1ccb70a3b7d4627c257fcbb2579b2dc4d2a0a (patch)
tree57c9fc4aae86d6dc4dacb921e673ac6b0deac26d /drivers/tty
parenta4f2dc9efc00a56ca30ce340a1405293ec9488a4 (diff)
parentc095ba7224d8edc71dcef0d655911399a8bd4a3f (diff)
Merge 3.11-rc4 into tty-next
We want the tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_gsc.c3
-rw-r--r--drivers/tty/serial/arc_uart.c2
-rw-r--r--drivers/tty/serial/mxs-auart.c38
-rw-r--r--drivers/tty/tty_port.c5
4 files changed, 26 insertions, 22 deletions
diff --git a/drivers/tty/serial/8250/8250_gsc.c b/drivers/tty/serial/8250/8250_gsc.c
index bb91b4713ebd..2e3ea1a70d7b 100644
--- a/drivers/tty/serial/8250/8250_gsc.c
+++ b/drivers/tty/serial/8250/8250_gsc.c
@@ -31,9 +31,8 @@ static int __init serial_init_chip(struct parisc_device *dev)
31 int err; 31 int err;
32 32
33#ifdef CONFIG_64BIT 33#ifdef CONFIG_64BIT
34 extern int iosapic_serial_irq(int cellnum);
35 if (!dev->irq && (dev->id.sversion == 0xad)) 34 if (!dev->irq && (dev->id.sversion == 0xad))
36 dev->irq = iosapic_serial_irq(dev->mod_index-1); 35 dev->irq = iosapic_serial_irq(dev);
37#endif 36#endif
38 37
39 if (!dev->irq) { 38 if (!dev->irq) {
diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c
index 6ac5270c74dd..37abf6ca2f34 100644
--- a/drivers/tty/serial/arc_uart.c
+++ b/drivers/tty/serial/arc_uart.c
@@ -776,6 +776,6 @@ module_init(arc_serial_init);
776module_exit(arc_serial_exit); 776module_exit(arc_serial_exit);
777 777
778MODULE_LICENSE("GPL"); 778MODULE_LICENSE("GPL");
779MODULE_ALIAS("plat-arcfpga/uart"); 779MODULE_ALIAS("platform:" DRIVER_NAME);
780MODULE_AUTHOR("Vineet Gupta"); 780MODULE_AUTHOR("Vineet Gupta");
781MODULE_DESCRIPTION("ARC(Synopsys) On-Chip(fpga) serial driver"); 781MODULE_DESCRIPTION("ARC(Synopsys) On-Chip(fpga) serial driver");
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index a63a20e0d69d..736e95c1ac4e 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -677,11 +677,18 @@ static void mxs_auart_settermios(struct uart_port *u,
677 677
678static irqreturn_t mxs_auart_irq_handle(int irq, void *context) 678static irqreturn_t mxs_auart_irq_handle(int irq, void *context)
679{ 679{
680 u32 istatus, istat; 680 u32 istat;
681 struct mxs_auart_port *s = context; 681 struct mxs_auart_port *s = context;
682 u32 stat = readl(s->port.membase + AUART_STAT); 682 u32 stat = readl(s->port.membase + AUART_STAT);
683 683
684 istatus = istat = readl(s->port.membase + AUART_INTR); 684 istat = readl(s->port.membase + AUART_INTR);
685
686 /* ack irq */
687 writel(istat & (AUART_INTR_RTIS
688 | AUART_INTR_TXIS
689 | AUART_INTR_RXIS
690 | AUART_INTR_CTSMIS),
691 s->port.membase + AUART_INTR_CLR);
685 692
686 if (istat & AUART_INTR_CTSMIS) { 693 if (istat & AUART_INTR_CTSMIS) {
687 uart_handle_cts_change(&s->port, stat & AUART_STAT_CTS); 694 uart_handle_cts_change(&s->port, stat & AUART_STAT_CTS);
@@ -701,12 +708,6 @@ static irqreturn_t mxs_auart_irq_handle(int irq, void *context)
701 istat &= ~AUART_INTR_TXIS; 708 istat &= ~AUART_INTR_TXIS;
702 } 709 }
703 710
704 writel(istatus & (AUART_INTR_RTIS
705 | AUART_INTR_TXIS
706 | AUART_INTR_RXIS
707 | AUART_INTR_CTSMIS),
708 s->port.membase + AUART_INTR_CLR);
709
710 return IRQ_HANDLED; 711 return IRQ_HANDLED;
711} 712}
712 713
@@ -849,7 +850,7 @@ auart_console_write(struct console *co, const char *str, unsigned int count)
849 struct mxs_auart_port *s; 850 struct mxs_auart_port *s;
850 struct uart_port *port; 851 struct uart_port *port;
851 unsigned int old_ctrl0, old_ctrl2; 852 unsigned int old_ctrl0, old_ctrl2;
852 unsigned int to = 1000; 853 unsigned int to = 20000;
853 854
854 if (co->index >= MXS_AUART_PORTS || co->index < 0) 855 if (co->index >= MXS_AUART_PORTS || co->index < 0)
855 return; 856 return;
@@ -870,18 +871,23 @@ auart_console_write(struct console *co, const char *str, unsigned int count)
870 871
871 uart_console_write(port, str, count, mxs_auart_console_putchar); 872 uart_console_write(port, str, count, mxs_auart_console_putchar);
872 873
873 /* 874 /* Finally, wait for transmitter to become empty ... */
874 * Finally, wait for transmitter to become empty
875 * and restore the TCR
876 */
877 while (readl(port->membase + AUART_STAT) & AUART_STAT_BUSY) { 875 while (readl(port->membase + AUART_STAT) & AUART_STAT_BUSY) {
876 udelay(1);
878 if (!to--) 877 if (!to--)
879 break; 878 break;
880 udelay(1);
881 } 879 }
882 880
883 writel(old_ctrl0, port->membase + AUART_CTRL0); 881 /*
884 writel(old_ctrl2, port->membase + AUART_CTRL2); 882 * ... and restore the TCR if we waited long enough for the transmitter
883 * to be idle. This might keep the transmitter enabled although it is
884 * unused, but that is better than to disable it while it is still
885 * transmitting.
886 */
887 if (!(readl(port->membase + AUART_STAT) & AUART_STAT_BUSY)) {
888 writel(old_ctrl0, port->membase + AUART_CTRL0);
889 writel(old_ctrl2, port->membase + AUART_CTRL2);
890 }
885 891
886 clk_disable(s->clk); 892 clk_disable(s->clk);
887} 893}
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index 121aeb9393e1..f597e88a705d 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
@@ -256,10 +256,9 @@ void tty_port_tty_hangup(struct tty_port *port, bool check_clocal)
256{ 256{
257 struct tty_struct *tty = tty_port_tty_get(port); 257 struct tty_struct *tty = tty_port_tty_get(port);
258 258
259 if (tty && (!check_clocal || !C_CLOCAL(tty))) { 259 if (tty && (!check_clocal || !C_CLOCAL(tty)))
260 tty_hangup(tty); 260 tty_hangup(tty);
261 tty_kref_put(tty); 261 tty_kref_put(tty);
262 }
263} 262}
264EXPORT_SYMBOL_GPL(tty_port_tty_hangup); 263EXPORT_SYMBOL_GPL(tty_port_tty_hangup);
265 264