diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-30 12:30:07 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-30 12:30:07 -0400 |
| commit | 9263a06a5896370789a8303baef8d69387071813 (patch) | |
| tree | fcb9668b0466d557ecf8e9dc55153d9078dcbd93 | |
| parent | dcca8de0aa597f14e31a1b38690626c9f6745fd5 (diff) | |
| parent | 96a5d18bc1338786fecac73599f1681f59a59a8e (diff) | |
Merge tag 'tty-4.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial fixes from Greg KH:
"Here are some small tty/serial driver fixes for 4.1-rc2.
They include some minor fixes that resolve reported issues, and a new
device quirk.
All have been in linux-next succesfully"
* tag 'tty-4.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
serial: 8250_pci: Add support for 16 port Exar boards
serial: samsung: fix serial console break
tty/serial: at91: maxburst was missing for dma transfers
serial: of-serial: Remove device_type = "serial" registration
serial: xilinx: Use platform_get_irq to get irq description structure
serial: core: Fix kernel-doc build warnings
tty: Re-add external interface for tty_set_termios()
| -rw-r--r-- | drivers/tty/serial/8250/8250_pci.c | 25 | ||||
| -rw-r--r-- | drivers/tty/serial/atmel_serial.c | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/of_serial.c | 1 | ||||
| -rw-r--r-- | drivers/tty/serial/samsung.c | 5 | ||||
| -rw-r--r-- | drivers/tty/serial/serial_core.c | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/uartlite.c | 11 | ||||
| -rw-r--r-- | drivers/tty/serial/xilinx_uartps.c | 12 | ||||
| -rw-r--r-- | drivers/tty/tty_ioctl.c | 3 | ||||
| -rw-r--r-- | include/linux/tty.h | 1 |
9 files changed, 44 insertions, 18 deletions
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index 08da4d3e2162..46bcebba54b2 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c | |||
| @@ -1998,6 +1998,8 @@ pci_wch_ch38x_setup(struct serial_private *priv, | |||
| 1998 | #define PCIE_DEVICE_ID_WCH_CH382_2S1P 0x3250 | 1998 | #define PCIE_DEVICE_ID_WCH_CH382_2S1P 0x3250 |
| 1999 | #define PCIE_DEVICE_ID_WCH_CH384_4S 0x3470 | 1999 | #define PCIE_DEVICE_ID_WCH_CH384_4S 0x3470 |
| 2000 | 2000 | ||
| 2001 | #define PCI_DEVICE_ID_EXAR_XR17V8358 0x8358 | ||
| 2002 | |||
| 2001 | /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ | 2003 | /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ |
| 2002 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 | 2004 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 |
| 2003 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588 | 2005 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1588 0x1588 |
| @@ -2520,6 +2522,13 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { | |||
| 2520 | .subdevice = PCI_ANY_ID, | 2522 | .subdevice = PCI_ANY_ID, |
| 2521 | .setup = pci_xr17v35x_setup, | 2523 | .setup = pci_xr17v35x_setup, |
| 2522 | }, | 2524 | }, |
| 2525 | { | ||
| 2526 | .vendor = PCI_VENDOR_ID_EXAR, | ||
| 2527 | .device = PCI_DEVICE_ID_EXAR_XR17V8358, | ||
| 2528 | .subvendor = PCI_ANY_ID, | ||
| 2529 | .subdevice = PCI_ANY_ID, | ||
| 2530 | .setup = pci_xr17v35x_setup, | ||
| 2531 | }, | ||
| 2523 | /* | 2532 | /* |
| 2524 | * Xircom cards | 2533 | * Xircom cards |
| 2525 | */ | 2534 | */ |
| @@ -2999,6 +3008,7 @@ enum pci_board_num_t { | |||
| 2999 | pbn_exar_XR17V352, | 3008 | pbn_exar_XR17V352, |
| 3000 | pbn_exar_XR17V354, | 3009 | pbn_exar_XR17V354, |
| 3001 | pbn_exar_XR17V358, | 3010 | pbn_exar_XR17V358, |
| 3011 | pbn_exar_XR17V8358, | ||
| 3002 | pbn_exar_ibm_saturn, | 3012 | pbn_exar_ibm_saturn, |
| 3003 | pbn_pasemi_1682M, | 3013 | pbn_pasemi_1682M, |
| 3004 | pbn_ni8430_2, | 3014 | pbn_ni8430_2, |
| @@ -3685,6 +3695,14 @@ static struct pciserial_board pci_boards[] = { | |||
| 3685 | .reg_shift = 0, | 3695 | .reg_shift = 0, |
| 3686 | .first_offset = 0, | 3696 | .first_offset = 0, |
| 3687 | }, | 3697 | }, |
| 3698 | [pbn_exar_XR17V8358] = { | ||
| 3699 | .flags = FL_BASE0, | ||
| 3700 | .num_ports = 16, | ||
| 3701 | .base_baud = 7812500, | ||
| 3702 | .uart_offset = 0x400, | ||
| 3703 | .reg_shift = 0, | ||
| 3704 | .first_offset = 0, | ||
| 3705 | }, | ||
| 3688 | [pbn_exar_ibm_saturn] = { | 3706 | [pbn_exar_ibm_saturn] = { |
| 3689 | .flags = FL_BASE0, | 3707 | .flags = FL_BASE0, |
| 3690 | .num_ports = 1, | 3708 | .num_ports = 1, |
| @@ -5080,7 +5098,7 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
| 5080 | 0, | 5098 | 0, |
| 5081 | 0, pbn_exar_XR17C158 }, | 5099 | 0, pbn_exar_XR17C158 }, |
| 5082 | /* | 5100 | /* |
| 5083 | * Exar Corp. XR17V35[248] Dual/Quad/Octal PCIe UARTs | 5101 | * Exar Corp. XR17V[48]35[248] Dual/Quad/Octal/Hexa PCIe UARTs |
| 5084 | */ | 5102 | */ |
| 5085 | { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V352, | 5103 | { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V352, |
| 5086 | PCI_ANY_ID, PCI_ANY_ID, | 5104 | PCI_ANY_ID, PCI_ANY_ID, |
| @@ -5094,7 +5112,10 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
| 5094 | PCI_ANY_ID, PCI_ANY_ID, | 5112 | PCI_ANY_ID, PCI_ANY_ID, |
| 5095 | 0, | 5113 | 0, |
| 5096 | 0, pbn_exar_XR17V358 }, | 5114 | 0, pbn_exar_XR17V358 }, |
| 5097 | 5115 | { PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17V8358, | |
| 5116 | PCI_ANY_ID, PCI_ANY_ID, | ||
| 5117 | 0, | ||
| 5118 | 0, pbn_exar_XR17V8358 }, | ||
| 5098 | /* | 5119 | /* |
| 5099 | * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke) | 5120 | * Topic TP560 Data/Fax/Voice 56k modem (reported by Evan Clarke) |
| 5100 | */ | 5121 | */ |
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index d58fe4763d9e..27dade29646b 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c | |||
| @@ -880,6 +880,7 @@ static int atmel_prepare_tx_dma(struct uart_port *port) | |||
| 880 | config.direction = DMA_MEM_TO_DEV; | 880 | config.direction = DMA_MEM_TO_DEV; |
| 881 | config.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; | 881 | config.dst_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; |
| 882 | config.dst_addr = port->mapbase + ATMEL_US_THR; | 882 | config.dst_addr = port->mapbase + ATMEL_US_THR; |
| 883 | config.dst_maxburst = 1; | ||
| 883 | 884 | ||
| 884 | ret = dmaengine_slave_config(atmel_port->chan_tx, | 885 | ret = dmaengine_slave_config(atmel_port->chan_tx, |
| 885 | &config); | 886 | &config); |
| @@ -1059,6 +1060,7 @@ static int atmel_prepare_rx_dma(struct uart_port *port) | |||
| 1059 | config.direction = DMA_DEV_TO_MEM; | 1060 | config.direction = DMA_DEV_TO_MEM; |
| 1060 | config.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; | 1061 | config.src_addr_width = DMA_SLAVE_BUSWIDTH_1_BYTE; |
| 1061 | config.src_addr = port->mapbase + ATMEL_US_RHR; | 1062 | config.src_addr = port->mapbase + ATMEL_US_RHR; |
| 1063 | config.src_maxburst = 1; | ||
| 1062 | 1064 | ||
| 1063 | ret = dmaengine_slave_config(atmel_port->chan_rx, | 1065 | ret = dmaengine_slave_config(atmel_port->chan_rx, |
| 1064 | &config); | 1066 | &config); |
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c index 5b73afb9f9f3..137381e649e5 100644 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c | |||
| @@ -346,7 +346,6 @@ static const struct of_device_id of_platform_serial_table[] = { | |||
| 346 | { .compatible = "ibm,qpace-nwp-serial", | 346 | { .compatible = "ibm,qpace-nwp-serial", |
| 347 | .data = (void *)PORT_NWPSERIAL, }, | 347 | .data = (void *)PORT_NWPSERIAL, }, |
| 348 | #endif | 348 | #endif |
| 349 | { .type = "serial", .data = (void *)PORT_UNKNOWN, }, | ||
| 350 | { /* end of list */ }, | 349 | { /* end of list */ }, |
| 351 | }; | 350 | }; |
| 352 | 351 | ||
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index cf08876922f1..a0ae942d9562 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c | |||
| @@ -1068,8 +1068,9 @@ static int s3c64xx_serial_startup(struct uart_port *port) | |||
| 1068 | spin_lock_irqsave(&port->lock, flags); | 1068 | spin_lock_irqsave(&port->lock, flags); |
| 1069 | 1069 | ||
| 1070 | ufcon = rd_regl(port, S3C2410_UFCON); | 1070 | ufcon = rd_regl(port, S3C2410_UFCON); |
| 1071 | ufcon |= S3C2410_UFCON_RESETRX | S3C2410_UFCON_RESETTX | | 1071 | ufcon |= S3C2410_UFCON_RESETRX | S5PV210_UFCON_RXTRIG8; |
| 1072 | S5PV210_UFCON_RXTRIG8; | 1072 | if (!uart_console(port)) |
| 1073 | ufcon |= S3C2410_UFCON_RESETTX; | ||
| 1073 | wr_regl(port, S3C2410_UFCON, ufcon); | 1074 | wr_regl(port, S3C2410_UFCON, ufcon); |
| 1074 | 1075 | ||
| 1075 | enable_rx_pio(ourport); | 1076 | enable_rx_pio(ourport); |
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index eb5b03be9dfd..0b7bb12dfc68 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c | |||
| @@ -1770,7 +1770,7 @@ static const struct file_operations uart_proc_fops = { | |||
| 1770 | * @port: the port to write the message | 1770 | * @port: the port to write the message |
| 1771 | * @s: array of characters | 1771 | * @s: array of characters |
| 1772 | * @count: number of characters in string to write | 1772 | * @count: number of characters in string to write |
| 1773 | * @write: function to write character to port | 1773 | * @putchar: function to write character to port |
| 1774 | */ | 1774 | */ |
| 1775 | void uart_console_write(struct uart_port *port, const char *s, | 1775 | void uart_console_write(struct uart_port *port, const char *s, |
| 1776 | unsigned int count, | 1776 | unsigned int count, |
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c index 708eead850b0..b1c6bd3d483f 100644 --- a/drivers/tty/serial/uartlite.c +++ b/drivers/tty/serial/uartlite.c | |||
| @@ -632,7 +632,8 @@ MODULE_DEVICE_TABLE(of, ulite_of_match); | |||
| 632 | 632 | ||
| 633 | static int ulite_probe(struct platform_device *pdev) | 633 | static int ulite_probe(struct platform_device *pdev) |
| 634 | { | 634 | { |
| 635 | struct resource *res, *res2; | 635 | struct resource *res; |
| 636 | int irq; | ||
| 636 | int id = pdev->id; | 637 | int id = pdev->id; |
| 637 | #ifdef CONFIG_OF | 638 | #ifdef CONFIG_OF |
| 638 | const __be32 *prop; | 639 | const __be32 *prop; |
| @@ -646,11 +647,11 @@ static int ulite_probe(struct platform_device *pdev) | |||
| 646 | if (!res) | 647 | if (!res) |
| 647 | return -ENODEV; | 648 | return -ENODEV; |
| 648 | 649 | ||
| 649 | res2 = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 650 | irq = platform_get_irq(pdev, 0); |
| 650 | if (!res2) | 651 | if (irq <= 0) |
| 651 | return -ENODEV; | 652 | return -ENXIO; |
| 652 | 653 | ||
| 653 | return ulite_assign(&pdev->dev, id, res->start, res2->start); | 654 | return ulite_assign(&pdev->dev, id, res->start, irq); |
| 654 | } | 655 | } |
| 655 | 656 | ||
| 656 | static int ulite_remove(struct platform_device *pdev) | 657 | static int ulite_remove(struct platform_device *pdev) |
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index f218ec658f5d..3ddbac767db3 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c | |||
| @@ -1331,9 +1331,9 @@ static SIMPLE_DEV_PM_OPS(cdns_uart_dev_pm_ops, cdns_uart_suspend, | |||
| 1331 | */ | 1331 | */ |
| 1332 | static int cdns_uart_probe(struct platform_device *pdev) | 1332 | static int cdns_uart_probe(struct platform_device *pdev) |
| 1333 | { | 1333 | { |
| 1334 | int rc, id; | 1334 | int rc, id, irq; |
| 1335 | struct uart_port *port; | 1335 | struct uart_port *port; |
| 1336 | struct resource *res, *res2; | 1336 | struct resource *res; |
| 1337 | struct cdns_uart *cdns_uart_data; | 1337 | struct cdns_uart *cdns_uart_data; |
| 1338 | 1338 | ||
| 1339 | cdns_uart_data = devm_kzalloc(&pdev->dev, sizeof(*cdns_uart_data), | 1339 | cdns_uart_data = devm_kzalloc(&pdev->dev, sizeof(*cdns_uart_data), |
| @@ -1380,9 +1380,9 @@ static int cdns_uart_probe(struct platform_device *pdev) | |||
| 1380 | goto err_out_clk_disable; | 1380 | goto err_out_clk_disable; |
| 1381 | } | 1381 | } |
| 1382 | 1382 | ||
| 1383 | res2 = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 1383 | irq = platform_get_irq(pdev, 0); |
| 1384 | if (!res2) { | 1384 | if (irq <= 0) { |
| 1385 | rc = -ENODEV; | 1385 | rc = -ENXIO; |
| 1386 | goto err_out_clk_disable; | 1386 | goto err_out_clk_disable; |
| 1387 | } | 1387 | } |
| 1388 | 1388 | ||
| @@ -1411,7 +1411,7 @@ static int cdns_uart_probe(struct platform_device *pdev) | |||
| 1411 | * and triggers invocation of the config_port() entry point. | 1411 | * and triggers invocation of the config_port() entry point. |
| 1412 | */ | 1412 | */ |
| 1413 | port->mapbase = res->start; | 1413 | port->mapbase = res->start; |
| 1414 | port->irq = res2->start; | 1414 | port->irq = irq; |
| 1415 | port->dev = &pdev->dev; | 1415 | port->dev = &pdev->dev; |
| 1416 | port->uartclk = clk_get_rate(cdns_uart_data->uartclk); | 1416 | port->uartclk = clk_get_rate(cdns_uart_data->uartclk); |
| 1417 | port->private_data = cdns_uart_data; | 1417 | port->private_data = cdns_uart_data; |
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c index 632fc8152061..8e53fe469664 100644 --- a/drivers/tty/tty_ioctl.c +++ b/drivers/tty/tty_ioctl.c | |||
| @@ -536,7 +536,7 @@ EXPORT_SYMBOL(tty_termios_hw_change); | |||
| 536 | * Locking: termios_rwsem | 536 | * Locking: termios_rwsem |
| 537 | */ | 537 | */ |
| 538 | 538 | ||
| 539 | static int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios) | 539 | int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios) |
| 540 | { | 540 | { |
| 541 | struct ktermios old_termios; | 541 | struct ktermios old_termios; |
| 542 | struct tty_ldisc *ld; | 542 | struct tty_ldisc *ld; |
| @@ -569,6 +569,7 @@ static int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios) | |||
| 569 | up_write(&tty->termios_rwsem); | 569 | up_write(&tty->termios_rwsem); |
| 570 | return 0; | 570 | return 0; |
| 571 | } | 571 | } |
| 572 | EXPORT_SYMBOL_GPL(tty_set_termios); | ||
| 572 | 573 | ||
| 573 | /** | 574 | /** |
| 574 | * set_termios - set termios values for a tty | 575 | * set_termios - set termios values for a tty |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 358a337af598..fe5623c9af71 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -491,6 +491,7 @@ static inline speed_t tty_get_baud_rate(struct tty_struct *tty) | |||
| 491 | 491 | ||
| 492 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); | 492 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); |
| 493 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); | 493 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); |
| 494 | extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt); | ||
| 494 | 495 | ||
| 495 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); | 496 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); |
| 496 | extern void tty_ldisc_deref(struct tty_ldisc *); | 497 | extern void tty_ldisc_deref(struct tty_ldisc *); |
