aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 16:27:36 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 16:27:36 -0500
commit9f9cba810f36d16f4e64477e879a69f6c47b389d (patch)
treed787abcbead1439d3f82f0719efe520fd9689f79 /drivers/tty
parentdbf5bef8da169b38db804996a661f8d634df8295 (diff)
parent949db153b6466c6f7cad5a427ecea94985927311 (diff)
Merge 3.8-rc5 into tty-next
This resolves a number of tty driver merge issues found in linux-next Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/pty.c2
-rw-r--r--drivers/tty/serial/8250/8250.c11
-rw-r--r--drivers/tty/serial/8250/8250.h1
-rw-r--r--drivers/tty/serial/8250/8250_dw.c2
-rw-r--r--drivers/tty/serial/8250/8250_pci.c42
-rw-r--r--drivers/tty/serial/ifx6x60.c4
-rw-r--r--drivers/tty/serial/mxs-auart.c6
-rw-r--r--drivers/tty/serial/samsung.c1
-rw-r--r--drivers/tty/serial/vt8500_serial.c10
9 files changed, 71 insertions, 8 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 40ff2bf68b43..755600f6120f 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -440,6 +440,8 @@ static int pty_bsd_ioctl(struct tty_struct *tty,
440 return pty_get_pktmode(tty, (int __user *)arg); 440 return pty_get_pktmode(tty, (int __user *)arg);
441 case TIOCSIG: /* Send signal to other side of pty */ 441 case TIOCSIG: /* Send signal to other side of pty */
442 return pty_signal(tty, (int) arg); 442 return pty_signal(tty, (int) arg);
443 case TIOCGPTN: /* TTY returns ENOTTY, but glibc expects EINVAL here */
444 return -EINVAL;
443 } 445 }
444 return -ENOIOCTLCMD; 446 return -ENOIOCTLCMD;
445} 447}
diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
index cb7db5a8ae92..24939ca3eedc 100644
--- a/drivers/tty/serial/8250/8250.c
+++ b/drivers/tty/serial/8250/8250.c
@@ -293,6 +293,12 @@ static const struct serial8250_config uart_config[] = {
293 UART_FCR_R_TRIG_00 | UART_FCR_T_TRIG_00, 293 UART_FCR_R_TRIG_00 | UART_FCR_T_TRIG_00,
294 .flags = UART_CAP_FIFO, 294 .flags = UART_CAP_FIFO,
295 }, 295 },
296 [PORT_BRCM_TRUMANAGE] = {
297 .name = "TruManage",
298 .fifo_size = 1,
299 .tx_loadsz = 1024,
300 .flags = UART_CAP_HFIFO,
301 },
296 [PORT_8250_CIR] = { 302 [PORT_8250_CIR] = {
297 .name = "CIR port" 303 .name = "CIR port"
298 } 304 }
@@ -1423,6 +1429,11 @@ void serial8250_tx_chars(struct uart_8250_port *up)
1423 port->icount.tx++; 1429 port->icount.tx++;
1424 if (uart_circ_empty(xmit)) 1430 if (uart_circ_empty(xmit))
1425 break; 1431 break;
1432 if (up->capabilities & UART_CAP_HFIFO) {
1433 if ((serial_port_in(port, UART_LSR) & BOTH_EMPTY) !=
1434 BOTH_EMPTY)
1435 break;
1436 }
1426 } while (--count > 0); 1437 } while (--count > 0);
1427 1438
1428 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) 1439 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index 363d549d2e0d..34eb676916fe 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -69,6 +69,7 @@ struct serial8250_config {
69#define UART_CAP_AFE (1 << 11) /* MCR-based hw flow control */ 69#define UART_CAP_AFE (1 << 11) /* MCR-based hw flow control */
70#define UART_CAP_UUE (1 << 12) /* UART needs IER bit 6 set (Xscale) */ 70#define UART_CAP_UUE (1 << 12) /* UART needs IER bit 6 set (Xscale) */
71#define UART_CAP_RTOIE (1 << 13) /* UART needs IER bit 4 set (Xscale, Tegra) */ 71#define UART_CAP_RTOIE (1 << 13) /* UART needs IER bit 4 set (Xscale, Tegra) */
72#define UART_CAP_HFIFO (1 << 14) /* UART has a "hidden" FIFO */
72 73
73#define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */ 74#define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */
74#define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */ 75#define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 117bb8b03598..db0e66f6dd0e 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -105,7 +105,7 @@ static int dw8250_handle_irq(struct uart_port *p)
105 } else if ((iir & UART_IIR_BUSY) == UART_IIR_BUSY) { 105 } else if ((iir & UART_IIR_BUSY) == UART_IIR_BUSY) {
106 /* Clear the USR and write the LCR again. */ 106 /* Clear the USR and write the LCR again. */
107 (void)p->serial_in(p, DW_UART_USR); 107 (void)p->serial_in(p, DW_UART_USR);
108 p->serial_out(p, d->last_lcr, UART_LCR); 108 p->serial_out(p, UART_LCR, d->last_lcr);
109 109
110 return 1; 110 return 1;
111 } 111 }
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 3b0cc3a09deb..3cb333242912 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1332,6 +1332,18 @@ pci_omegapci_setup(struct serial_private *priv,
1332 return setup_port(priv, port, 2, idx * 8, 0); 1332 return setup_port(priv, port, 2, idx * 8, 0);
1333} 1333}
1334 1334
1335static int
1336pci_brcm_trumanage_setup(struct serial_private *priv,
1337 const struct pciserial_board *board,
1338 struct uart_8250_port *port, int idx)
1339{
1340 int ret = pci_default_setup(priv, board, port, idx);
1341
1342 port->port.type = PORT_BRCM_TRUMANAGE;
1343 port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE);
1344 return ret;
1345}
1346
1335static int skip_tx_en_setup(struct serial_private *priv, 1347static int skip_tx_en_setup(struct serial_private *priv,
1336 const struct pciserial_board *board, 1348 const struct pciserial_board *board,
1337 struct uart_8250_port *port, int idx) 1349 struct uart_8250_port *port, int idx)
@@ -1548,9 +1560,10 @@ pci_wch_ch353_setup(struct serial_private *priv,
1548#define PCI_VENDOR_ID_AGESTAR 0x5372 1560#define PCI_VENDOR_ID_AGESTAR 0x5372
1549#define PCI_DEVICE_ID_AGESTAR_9375 0x6872 1561#define PCI_DEVICE_ID_AGESTAR_9375 0x6872
1550#define PCI_VENDOR_ID_ASIX 0x9710 1562#define PCI_VENDOR_ID_ASIX 0x9710
1551#define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0019
1552#define PCI_DEVICE_ID_COMMTECH_4224PCIE 0x0020 1563#define PCI_DEVICE_ID_COMMTECH_4224PCIE 0x0020
1553#define PCI_DEVICE_ID_COMMTECH_4228PCIE 0x0021 1564#define PCI_DEVICE_ID_COMMTECH_4228PCIE 0x0021
1565#define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0022
1566#define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a
1554 1567
1555 1568
1556/* Unknown vendors/cards - this should not be in linux/pci_ids.h */ 1569/* Unknown vendors/cards - this should not be in linux/pci_ids.h */
@@ -2211,6 +2224,17 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = {
2211 .setup = pci_xr17v35x_setup, 2224 .setup = pci_xr17v35x_setup,
2212 }, 2225 },
2213 /* 2226 /*
2227 * Broadcom TruManage (NetXtreme)
2228 */
2229 {
2230 .vendor = PCI_VENDOR_ID_BROADCOM,
2231 .device = PCI_DEVICE_ID_BROADCOM_TRUMANAGE,
2232 .subvendor = PCI_ANY_ID,
2233 .subdevice = PCI_ANY_ID,
2234 .setup = pci_brcm_trumanage_setup,
2235 },
2236
2237 /*
2214 * Default "match everything" terminator entry 2238 * Default "match everything" terminator entry
2215 */ 2239 */
2216 { 2240 {
@@ -2405,6 +2429,7 @@ enum pci_board_num_t {
2405 pbn_ce4100_1_115200, 2429 pbn_ce4100_1_115200,
2406 pbn_omegapci, 2430 pbn_omegapci,
2407 pbn_NETMOS9900_2s_115200, 2431 pbn_NETMOS9900_2s_115200,
2432 pbn_brcm_trumanage,
2408}; 2433};
2409 2434
2410/* 2435/*
@@ -2503,7 +2528,7 @@ static struct pciserial_board pci_boards[] = {
2503 2528
2504 [pbn_b0_8_1152000_200] = { 2529 [pbn_b0_8_1152000_200] = {
2505 .flags = FL_BASE0, 2530 .flags = FL_BASE0,
2506 .num_ports = 2, 2531 .num_ports = 8,
2507 .base_baud = 1152000, 2532 .base_baud = 1152000,
2508 .uart_offset = 0x200, 2533 .uart_offset = 0x200,
2509 }, 2534 },
@@ -3149,6 +3174,12 @@ static struct pciserial_board pci_boards[] = {
3149 .num_ports = 2, 3174 .num_ports = 2,
3150 .base_baud = 115200, 3175 .base_baud = 115200,
3151 }, 3176 },
3177 [pbn_brcm_trumanage] = {
3178 .flags = FL_BASE0,
3179 .num_ports = 1,
3180 .reg_shift = 2,
3181 .base_baud = 115200,
3182 },
3152}; 3183};
3153 3184
3154static const struct pci_device_id blacklist[] = { 3185static const struct pci_device_id blacklist[] = {
@@ -4780,6 +4811,13 @@ static struct pci_device_id serial_pci_tbl[] = {
4780 pbn_omegapci }, 4811 pbn_omegapci },
4781 4812
4782 /* 4813 /*
4814 * Broadcom TruManage
4815 */
4816 { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BROADCOM_TRUMANAGE,
4817 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
4818 pbn_brcm_trumanage },
4819
4820 /*
4783 * AgeStar as-prs2-009 4821 * AgeStar as-prs2-009
4784 */ 4822 */
4785 { PCI_VENDOR_ID_AGESTAR, PCI_DEVICE_ID_AGESTAR_9375, 4823 { PCI_VENDOR_ID_AGESTAR, PCI_DEVICE_ID_AGESTAR_9375,
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index f083641bf475..68d7ce997ede 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -636,6 +636,7 @@ static void ifx_port_shutdown(struct tty_port *port)
636 636
637 clear_bit(IFX_SPI_STATE_IO_AVAILABLE, &ifx_dev->flags); 637 clear_bit(IFX_SPI_STATE_IO_AVAILABLE, &ifx_dev->flags);
638 mrdy_set_low(ifx_dev); 638 mrdy_set_low(ifx_dev);
639 del_timer(&ifx_dev->spi_timer);
639 clear_bit(IFX_SPI_STATE_TIMER_PENDING, &ifx_dev->flags); 640 clear_bit(IFX_SPI_STATE_TIMER_PENDING, &ifx_dev->flags);
640 tasklet_kill(&ifx_dev->io_work_tasklet); 641 tasklet_kill(&ifx_dev->io_work_tasklet);
641} 642}
@@ -805,7 +806,8 @@ static void ifx_spi_io(unsigned long data)
805 ifx_dev->spi_xfer.cs_change = 0; 806 ifx_dev->spi_xfer.cs_change = 0;
806 ifx_dev->spi_xfer.speed_hz = ifx_dev->spi_dev->max_speed_hz; 807 ifx_dev->spi_xfer.speed_hz = ifx_dev->spi_dev->max_speed_hz;
807 /* ifx_dev->spi_xfer.speed_hz = 390625; */ 808 /* ifx_dev->spi_xfer.speed_hz = 390625; */
808 ifx_dev->spi_xfer.bits_per_word = spi_bpw; 809 ifx_dev->spi_xfer.bits_per_word =
810 ifx_dev->spi_dev->bits_per_word;
809 811
810 ifx_dev->spi_xfer.tx_buf = ifx_dev->tx_buffer; 812 ifx_dev->spi_xfer.tx_buf = ifx_dev->tx_buffer;
811 ifx_dev->spi_xfer.rx_buf = ifx_dev->rx_buffer; 813 ifx_dev->spi_xfer.rx_buf = ifx_dev->rx_buffer;
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index df0ba32f88ad..d549fe1fa42a 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -253,7 +253,7 @@ static void mxs_auart_tx_chars(struct mxs_auart_port *s)
253 struct circ_buf *xmit = &s->port.state->xmit; 253 struct circ_buf *xmit = &s->port.state->xmit;
254 254
255 if (auart_dma_enabled(s)) { 255 if (auart_dma_enabled(s)) {
256 int i = 0; 256 u32 i = 0;
257 int size; 257 int size;
258 void *buffer = s->tx_dma_buf; 258 void *buffer = s->tx_dma_buf;
259 259
@@ -411,10 +411,12 @@ static void mxs_auart_set_mctrl(struct uart_port *u, unsigned mctrl)
411 411
412 u32 ctrl = readl(u->membase + AUART_CTRL2); 412 u32 ctrl = readl(u->membase + AUART_CTRL2);
413 413
414 ctrl &= ~AUART_CTRL2_RTSEN; 414 ctrl &= ~(AUART_CTRL2_RTSEN | AUART_CTRL2_RTS);
415 if (mctrl & TIOCM_RTS) { 415 if (mctrl & TIOCM_RTS) {
416 if (tty_port_cts_enabled(&u->state->port)) 416 if (tty_port_cts_enabled(&u->state->port))
417 ctrl |= AUART_CTRL2_RTSEN; 417 ctrl |= AUART_CTRL2_RTSEN;
418 else
419 ctrl |= AUART_CTRL2_RTS;
418 } 420 }
419 421
420 s->ctrl = mctrl; 422 s->ctrl = mctrl;
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index 3aa3c4c83f8b..2769a38d15b6 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -1004,7 +1004,6 @@ static void s3c24xx_serial_resetport(struct uart_port *port,
1004 1004
1005 ucon &= ucon_mask; 1005 ucon &= ucon_mask;
1006 wr_regl(port, S3C2410_UCON, ucon | cfg->ucon); 1006 wr_regl(port, S3C2410_UCON, ucon | cfg->ucon);
1007 wr_regl(port, S3C2410_ULCON, cfg->ulcon);
1008 1007
1009 /* reset both fifos */ 1008 /* reset both fifos */
1010 wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH); 1009 wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH);
diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c
index 5fb59c53abf9..a3f9dd5c9dff 100644
--- a/drivers/tty/serial/vt8500_serial.c
+++ b/drivers/tty/serial/vt8500_serial.c
@@ -610,7 +610,15 @@ static int vt8500_serial_probe(struct platform_device *pdev)
610 vt8500_port->uart.line = port; 610 vt8500_port->uart.line = port;
611 vt8500_port->uart.dev = &pdev->dev; 611 vt8500_port->uart.dev = &pdev->dev;
612 vt8500_port->uart.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; 612 vt8500_port->uart.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
613 vt8500_port->uart.uartclk = clk_get_rate(vt8500_port->clk); 613
614 vt8500_port->clk = of_clk_get(pdev->dev.of_node, 0);
615 if (!IS_ERR(vt8500_port->clk)) {
616 vt8500_port->uart.uartclk = clk_get_rate(vt8500_port->clk);
617 } else {
618 /* use the default of 24Mhz if not specified and warn */
619 pr_warn("%s: serial clock source not specified\n", __func__);
620 vt8500_port->uart.uartclk = 24000000;
621 }
614 622
615 snprintf(vt8500_port->name, sizeof(vt8500_port->name), 623 snprintf(vt8500_port->name, sizeof(vt8500_port->name),
616 "VT8500 UART%d", pdev->id); 624 "VT8500 UART%d", pdev->id);