diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2014-03-14 05:26:45 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-03-14 05:26:45 -0400 |
commit | 9e294427f6e427dbaf46140303acded06365f53c (patch) | |
tree | 0669100cbd79fe8612463900171c98873d8dc454 /drivers/tty/serial | |
parent | 23600969ff137cf4c3bc9098f77e381de334e3f7 (diff) | |
parent | fa389e220254c69ffae0d403eac4146171062d08 (diff) |
Merge tag 'v3.14-rc6' into devel
Linux 3.14-rc6
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/8250/8250_core.c | 18 | ||||
-rw-r--r-- | drivers/tty/serial/8250/8250_dw.c | 4 | ||||
-rw-r--r-- | drivers/tty/serial/8250/8250_pci.c | 3 | ||||
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 11 | ||||
-rw-r--r-- | drivers/tty/serial/sirfsoc_uart.c | 4 |
5 files changed, 32 insertions, 8 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 61ecd709a722..69932b7556cf 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c | |||
@@ -2433,6 +2433,24 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, | |||
2433 | serial_dl_write(up, quot); | 2433 | serial_dl_write(up, quot); |
2434 | 2434 | ||
2435 | /* | 2435 | /* |
2436 | * XR17V35x UARTs have an extra fractional divisor register (DLD) | ||
2437 | * | ||
2438 | * We need to recalculate all of the registers, because DLM and DLL | ||
2439 | * are already rounded to a whole integer. | ||
2440 | * | ||
2441 | * When recalculating we use a 32x clock instead of a 16x clock to | ||
2442 | * allow 1-bit for rounding in the fractional part. | ||
2443 | */ | ||
2444 | if (up->port.type == PORT_XR17V35X) { | ||
2445 | unsigned int baud_x32 = (port->uartclk * 2) / baud; | ||
2446 | u16 quot = baud_x32 / 32; | ||
2447 | u8 quot_frac = DIV_ROUND_CLOSEST(baud_x32 % 32, 2); | ||
2448 | |||
2449 | serial_dl_write(up, quot); | ||
2450 | serial_port_out(port, 0x2, quot_frac & 0xf); | ||
2451 | } | ||
2452 | |||
2453 | /* | ||
2436 | * LCR DLAB must be set to enable 64-byte FIFO mode. If the FCR | 2454 | * LCR DLAB must be set to enable 64-byte FIFO mode. If the FCR |
2437 | * is written without DLAB set, this mode will be disabled. | 2455 | * is written without DLAB set, this mode will be disabled. |
2438 | */ | 2456 | */ |
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index faa64e646100..ed3113576740 100644 --- a/drivers/tty/serial/8250/8250_dw.c +++ b/drivers/tty/serial/8250/8250_dw.c | |||
@@ -391,7 +391,7 @@ static int dw8250_remove(struct platform_device *pdev) | |||
391 | return 0; | 391 | return 0; |
392 | } | 392 | } |
393 | 393 | ||
394 | #ifdef CONFIG_PM | 394 | #ifdef CONFIG_PM_SLEEP |
395 | static int dw8250_suspend(struct device *dev) | 395 | static int dw8250_suspend(struct device *dev) |
396 | { | 396 | { |
397 | struct dw8250_data *data = dev_get_drvdata(dev); | 397 | struct dw8250_data *data = dev_get_drvdata(dev); |
@@ -409,7 +409,7 @@ static int dw8250_resume(struct device *dev) | |||
409 | 409 | ||
410 | return 0; | 410 | return 0; |
411 | } | 411 | } |
412 | #endif /* CONFIG_PM */ | 412 | #endif /* CONFIG_PM_SLEEP */ |
413 | 413 | ||
414 | #ifdef CONFIG_PM_RUNTIME | 414 | #ifdef CONFIG_PM_RUNTIME |
415 | static int dw8250_runtime_suspend(struct device *dev) | 415 | static int dw8250_runtime_suspend(struct device *dev) |
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index 50228eed3b6f..0ff3e3624d4c 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c | |||
@@ -783,7 +783,8 @@ static int pci_netmos_9900_setup(struct serial_private *priv, | |||
783 | { | 783 | { |
784 | unsigned int bar; | 784 | unsigned int bar; |
785 | 785 | ||
786 | if ((priv->dev->subsystem_device & 0xff00) == 0x3000) { | 786 | if ((priv->dev->device != PCI_DEVICE_ID_NETMOS_9865) && |
787 | (priv->dev->subsystem_device & 0xff00) == 0x3000) { | ||
787 | /* netmos apparently orders BARs by datasheet layout, so serial | 788 | /* netmos apparently orders BARs by datasheet layout, so serial |
788 | * ports get BARs 0 and 3 (or 1 and 4 for memmapped) | 789 | * ports get BARs 0 and 3 (or 1 and 4 for memmapped) |
789 | */ | 790 | */ |
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index fa511ebab67c..77f035158d6c 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
@@ -738,9 +738,6 @@ static int serial_omap_startup(struct uart_port *port) | |||
738 | return retval; | 738 | return retval; |
739 | } | 739 | } |
740 | disable_irq(up->wakeirq); | 740 | disable_irq(up->wakeirq); |
741 | } else { | ||
742 | dev_info(up->port.dev, "no wakeirq for uart%d\n", | ||
743 | up->port.line); | ||
744 | } | 741 | } |
745 | 742 | ||
746 | dev_dbg(up->port.dev, "serial_omap_startup+%d\n", up->port.line); | 743 | dev_dbg(up->port.dev, "serial_omap_startup+%d\n", up->port.line); |
@@ -1604,8 +1601,11 @@ static int serial_omap_probe_rs485(struct uart_omap_port *up, | |||
1604 | flags & SER_RS485_RTS_AFTER_SEND); | 1601 | flags & SER_RS485_RTS_AFTER_SEND); |
1605 | if (ret < 0) | 1602 | if (ret < 0) |
1606 | return ret; | 1603 | return ret; |
1607 | } else | 1604 | } else if (up->rts_gpio == -EPROBE_DEFER) { |
1605 | return -EPROBE_DEFER; | ||
1606 | } else { | ||
1608 | up->rts_gpio = -EINVAL; | 1607 | up->rts_gpio = -EINVAL; |
1608 | } | ||
1609 | 1609 | ||
1610 | if (of_property_read_u32_array(np, "rs485-rts-delay", | 1610 | if (of_property_read_u32_array(np, "rs485-rts-delay", |
1611 | rs485_delay, 2) == 0) { | 1611 | rs485_delay, 2) == 0) { |
@@ -1687,6 +1687,9 @@ static int serial_omap_probe(struct platform_device *pdev) | |||
1687 | up->port.iotype = UPIO_MEM; | 1687 | up->port.iotype = UPIO_MEM; |
1688 | up->port.irq = uartirq; | 1688 | up->port.irq = uartirq; |
1689 | up->wakeirq = wakeirq; | 1689 | up->wakeirq = wakeirq; |
1690 | if (!up->wakeirq) | ||
1691 | dev_info(up->port.dev, "no wakeirq for uart%d\n", | ||
1692 | up->port.line); | ||
1690 | 1693 | ||
1691 | up->port.regshift = 2; | 1694 | up->port.regshift = 2; |
1692 | up->port.fifosize = 64; | 1695 | up->port.fifosize = 64; |
diff --git a/drivers/tty/serial/sirfsoc_uart.c b/drivers/tty/serial/sirfsoc_uart.c index 49a2ffd101a7..b7bfe24d4ebc 100644 --- a/drivers/tty/serial/sirfsoc_uart.c +++ b/drivers/tty/serial/sirfsoc_uart.c | |||
@@ -542,8 +542,10 @@ static void sirfsoc_rx_tmo_process_tl(unsigned long param) | |||
542 | wr_regl(port, ureg->sirfsoc_rx_dma_io_ctrl, | 542 | wr_regl(port, ureg->sirfsoc_rx_dma_io_ctrl, |
543 | rd_regl(port, ureg->sirfsoc_rx_dma_io_ctrl) | | 543 | rd_regl(port, ureg->sirfsoc_rx_dma_io_ctrl) | |
544 | SIRFUART_IO_MODE); | 544 | SIRFUART_IO_MODE); |
545 | sirfsoc_uart_pio_rx_chars(port, 4 - sirfport->rx_io_count); | ||
546 | spin_unlock_irqrestore(&sirfport->rx_lock, flags); | 545 | spin_unlock_irqrestore(&sirfport->rx_lock, flags); |
546 | spin_lock(&port->lock); | ||
547 | sirfsoc_uart_pio_rx_chars(port, 4 - sirfport->rx_io_count); | ||
548 | spin_unlock(&port->lock); | ||
547 | if (sirfport->rx_io_count == 4) { | 549 | if (sirfport->rx_io_count == 4) { |
548 | spin_lock_irqsave(&sirfport->rx_lock, flags); | 550 | spin_lock_irqsave(&sirfport->rx_lock, flags); |
549 | sirfport->rx_io_count = 0; | 551 | sirfport->rx_io_count = 0; |