Skip to content

Commit

Permalink
Merge tag 'tty-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/gregkh/tty

Pull tty/serial driver updates from Greg KH:
 "Here's the big tty/serial driver update for 3.19-rc1.

  There are a number of TTY core changes/fixes in here from Peter Hurley
  that have all been teted in linux-next for a long time now.  There are
  also the normal serial driver updates as well, full details in the
  changelog below"

* tag 'tty-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (219 commits)
  serial: pxa: hold port.lock when reporting modem line changes
  tty-hvsi_lib: Deletion of an unnecessary check before the function call "tty_kref_put"
  tty: Deletion of unnecessary checks before two function calls
  n_tty: Fix read_buf race condition, increment read_head after pushing data
  serial: of-serial: add PM suspend/resume support
  Revert "serial: of-serial: add PM suspend/resume support"
  Revert "serial: of-serial: fix up PM ops on no_console_suspend and port type"
  serial: 8250: don't attempt a trylock if in sysrq
  serial: core: Add big-endian iotype
  serial: samsung: use port->fifosize instead of hardcoded values
  serial: samsung: prefer to use fifosize from driver data
  serial: samsung: fix style problems
  serial: samsung: wait for transfer completion before clock disable
  serial: icom: fix error return code
  serial: tegra: clean up tty-flag assignments
  serial: Fix io address assign flow with Fintek PCI-to-UART Product
  serial: mxs-auart: fix tx_empty against shift register
  serial: mxs-auart: fix gpio change detection on interrupt
  serial: mxs-auart: Fix mxs_auart_set_ldisc()
  serial: 8250_dw: Use 64-bit access for OCTEON.
  ...
  • Loading branch information
torvalds committed Dec 14, 2014
2 parents e7cf773 + dd63af1 commit 37da7bb
Show file tree
Hide file tree
Showing 102 changed files with 4,755 additions and 1,596 deletions.
30 changes: 30 additions & 0 deletions Documentation/devicetree/bindings/serial/bcm63xx-uart.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
* BCM63xx UART

Required properties:

- compatible: "brcm,bcm6345-uart"

- reg: The base address of the UART register bank.

- interrupts: A single interrupt specifier.

- clocks: Clock driving the hardware; used to figure out the baud rate
divisor.

Example:

uart0: serial@14e00520 {
compatible = "brcm,bcm6345-uart";
reg = <0x14e00520 0x18>;
interrupt-parent = <&periph_intc>;
interrupts = <2>;
clocks = <&periph_clk>;
};

clocks {
periph_clk: periph_clk@0 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <54000000>;
};
};
10 changes: 9 additions & 1 deletion Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ Required properties:
- dma-names: "rx" for RX channel, "tx" for TX channel.

Optional properties:
- fsl,uart-has-rtscts : Indicate the UART has RTS and CTS lines,
- fsl,uart-has-rtscts : Indicate the UART has RTS and CTS lines
for hardware flow control,
it also means you enable the DMA support for this UART.
- {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD
line respectively. It will use specified PIO instead of the peripheral
function pin for the USART feature.
If unsure, don't specify this property.

Example:
auart0: serial@8006a000 {
Expand All @@ -21,6 +26,9 @@ auart0: serial@8006a000 {
interrupts = <112>;
dmas = <&dma_apbx 8>, <&dma_apbx 9>;
dma-names = "rx", "tx";
cts-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
dsr-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
dcd-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
};

Note: Each auart port should have an alias correctly numbered in "aliases"
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/serial/of-serial.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Required properties:
- "ns16850"
- "nvidia,tegra20-uart"
- "nxp,lpc3220-uart"
- "ralink,rt2880-uart"
- "ibm,qpace-nwp-serial"
- "altr,16550-FIFO32"
- "altr,16550-FIFO64"
Expand Down
20 changes: 16 additions & 4 deletions Documentation/devicetree/bindings/serial/pl011.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,35 @@ Required properties:
- interrupts: exactly one interrupt specifier

Optional properties:
- pinctrl: When present, must have one state named "default",
- pinctrl:
When present, must have one state named "default",
and may contain a second name named "sleep". The former
state sets up pins for ordinary operation whereas
the latter state will put the associated pins to sleep
when the UART is unused
- clocks: When present, the first clock listed must correspond to
- clocks:
When present, the first clock listed must correspond to
the clock named UARTCLK on the IP block, i.e. the clock
to the external serial line, whereas the second clock
must correspond to the PCLK clocking the internal logic
of the block. Just listing one clock (the first one) is
deprecated.
- clocks-names: When present, the first clock listed must be named
- clocks-names:
When present, the first clock listed must be named
"uartclk" and the second clock listed must be named
"apb_pclk"
- dmas: When present, may have one or two dma channels.
- dmas:
When present, may have one or two dma channels.
The first one must be named "rx", the second one
must be named "tx".
- auto-poll:
Enables polling when using RX DMA.
- poll-rate-ms:
Rate at which poll occurs when auto-poll is set,
default 100ms.
- poll-timeout-ms:
Poll timeout when auto-poll is set, default
3000ms.

See also bindings/arm/primecell.txt

Expand Down
69 changes: 47 additions & 22 deletions Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,52 @@ Optional properties:
- dmas: Should contain dma specifiers for transmit and receive channels
- dma-names: Should contain "tx" for transmit and "rx" for receive channels

Note: Aliases may be defined to ensure the correct ordering of the UARTs.
The alias serialN will result in the UART being assigned port N. If any
serialN alias exists, then an alias must exist for each enabled UART. The
serialN aliases should be in a .dts file instead of in a .dtsi file.

Examples:

A uartdm v1.4 device with dma capabilities.

serial@f991e000 {
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
reg = <0xf991e000 0x1000>;
interrupts = <0 108 0x0>;
clocks = <&blsp1_uart2_apps_cxc>, <&blsp1_ahb_cxc>;
clock-names = "core", "iface";
dmas = <&dma0 0>, <&dma0 1>;
dma-names = "tx", "rx";
};

A uartdm v1.3 device without dma capabilities and part of a GSBI complex.

serial@19c40000 {
compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
reg = <0x19c40000 0x1000>,
<0x19c00000 0x1000>;
interrupts = <0 195 0x0>;
clocks = <&gsbi5_uart_cxc>, <&gsbi5_ahb_cxc>;
clock-names = "core", "iface";
};
- A uartdm v1.4 device with dma capabilities.

serial@f991e000 {
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
reg = <0xf991e000 0x1000>;
interrupts = <0 108 0x0>;
clocks = <&blsp1_uart2_apps_cxc>, <&blsp1_ahb_cxc>;
clock-names = "core", "iface";
dmas = <&dma0 0>, <&dma0 1>;
dma-names = "tx", "rx";
};

- A uartdm v1.3 device without dma capabilities and part of a GSBI complex.

serial@19c40000 {
compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
reg = <0x19c40000 0x1000>,
<0x19c00000 0x1000>;
interrupts = <0 195 0x0>;
clocks = <&gsbi5_uart_cxc>, <&gsbi5_ahb_cxc>;
clock-names = "core", "iface";
};

- serialN alias.

aliases {
serial0 = &uarta;
serial1 = &uartc;
serial2 = &uartb;
};

uarta: serial@12490000 {
status = "ok";
};

uartb: serial@16340000 {
status = "ok";
};

uartc: serial@1a240000 {
status = "ok";
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Required properties:

- compatible: Must contain one of the following:

- "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
- "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
- "renesas,scif-r7s72100" for R7S72100 (RZ/A1H) SCIF compatible UART.
- "renesas,scifa-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFA compatible UART.
- "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART.
- "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART.
Expand All @@ -20,6 +19,12 @@ Required properties:
- "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
- "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART.
- "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART.
- "renesas,scif-r8a7794" for R8A7794 (R-Car E2) SCIF compatible UART.
- "renesas,scifa-r8a7794" for R8A7794 (R-Car E2) SCIFA compatible UART.
- "renesas,scifb-r8a7794" for R8A7794 (R-Car E2) SCIFB compatible UART.
- "renesas,hscif-r8a7794" for R8A7794 (R-Car E2) HSCIF compatible UART.
- "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
- "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
- "renesas,scif" for generic SCIF compatible UART.
- "renesas,scifa" for generic SCIFA compatible UART.
- "renesas,scifb" for generic SCIFB compatible UART.
Expand Down
16 changes: 15 additions & 1 deletion Documentation/devicetree/bindings/serial/sirf-uart.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
* CSR SiRFprimaII/atlasVI Universal Synchronous Asynchronous Receiver/Transmitter *

Required properties:
- compatible : Should be "sirf,prima2-uart" or "sirf, prima2-usp-uart"
- compatible : Should be "sirf,prima2-uart", "sirf, prima2-usp-uart",
"sirf,marco-uart" or "sirf,marco-bt-uart" which means
uart located in BT module and used for BT.
- reg : Offset and length of the register set for the device
- interrupts : Should contain uart interrupt
- fifosize : Should define hardware rx/tx fifo size
Expand Down Expand Up @@ -31,3 +33,15 @@ usp@b0090000 {
rts-gpios = <&gpio 15 0>;
cts-gpios = <&gpio 46 0>;
};

for uart use in BT module,
uart6: uart@11000000 {
cell-index = <6>;
compatible = "sirf,marco-bt-uart", "sirf,marco-uart";
reg = <0x11000000 0x1000>;
interrupts = <0 100 0>;
clocks = <&clks 138>, <&clks 140>, <&clks 141>;
clock-names = "uart", "general", "noc";
fifosize = <128>;
status = "disabled";
}
6 changes: 4 additions & 2 deletions Documentation/serial/driver
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ The core driver uses the info->tmpbuf_sem lock to prevent multi-threaded
access to the info->tmpbuf bouncebuffer used for port writes.

The port_sem semaphore is used to protect against ports being added/
removed or reconfigured at inappropriate times.
removed or reconfigured at inappropriate times. Since v2.6.27, this
semaphore has been the 'mutex' member of the tty_port struct, and
commonly referred to as the port mutex (or port->mutex).


uart_ops
Expand Down Expand Up @@ -248,7 +250,7 @@ hardware.
Other flags may be used (eg, xon/xoff characters) if your
hardware supports hardware "soft" flow control.

Locking: none.
Locking: caller holds port->mutex
Interrupts: caller dependent.
This call must not sleep

Expand Down
6 changes: 6 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -8026,6 +8026,12 @@ S: Maintained
F: Documentation/serial/rocket.txt
F: drivers/tty/rocket*

ROCKETPORT EXPRESS/INFINITY DRIVER
M: Kevin Cernekee <cernekee@gmail.com>
L: linux-serial@vger.kernel.org
S: Odd Fixes
F: drivers/tty/serial/rp2.*

ROSE NETWORK LAYER
M: Ralf Baechle <ralf@linux-mips.org>
L: linux-hams@vger.kernel.org
Expand Down
7 changes: 3 additions & 4 deletions arch/blackfin/include/asm/bfin_serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
#ifndef __BFIN_ASM_SERIAL_H__
#define __BFIN_ASM_SERIAL_H__

#include <linux/circ_buf.h>
#include <linux/serial_core.h>
#include <linux/spinlock.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <mach/anomaly.h>
#include <mach/bfin_serial.h>

Expand All @@ -25,10 +28,6 @@
# endif
#endif

struct circ_buf;
struct timer_list;
struct work_struct;

struct bfin_serial_port {
struct uart_port port;
unsigned int old_status;
Expand Down
6 changes: 5 additions & 1 deletion arch/um/drivers/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ static irqreturn_t winch_interrupt(int irq, void *data)
int fd = winch->fd;
int err;
char c;
struct pid *pgrp;

if (fd != -1) {
err = generic_read(fd, &c, NULL);
Expand All @@ -657,7 +658,10 @@ static irqreturn_t winch_interrupt(int irq, void *data)
if (line != NULL) {
chan_window_size(line, &tty->winsize.ws_row,
&tty->winsize.ws_col);
kill_pgrp(tty->pgrp, SIGWINCH, 1);
pgrp = tty_get_pgrp(tty);
if (pgrp)
kill_pgrp(pgrp, SIGWINCH, 1);
put_pid(pgrp);
}
tty_kref_put(tty);
}
Expand Down
10 changes: 10 additions & 0 deletions drivers/parport/parport_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ enum parport_pc_pci_cards {
timedia_9079c,
wch_ch353_1s1p,
wch_ch353_2s1p,
wch_ch382_2s1p,
sunix_2s1p,
};

Expand Down Expand Up @@ -151,6 +152,7 @@ static struct parport_pc_pci cards[] = {
/* timedia_9079c */ { 1, { { 2, 3 }, } },
/* wch_ch353_1s1p*/ { 1, { { 1, -1}, } },
/* wch_ch353_2s1p*/ { 1, { { 2, -1}, } },
/* wch_ch382_2s1p*/ { 1, { { 2, -1}, } },
/* sunix_2s1p */ { 1, { { 3, -1 }, } },
};

Expand Down Expand Up @@ -257,6 +259,7 @@ static struct pci_device_id parport_serial_pci_tbl[] = {
/* WCH CARDS */
{ 0x4348, 0x5053, PCI_ANY_ID, PCI_ANY_ID, 0, 0, wch_ch353_1s1p},
{ 0x4348, 0x7053, 0x4348, 0x3253, 0, 0, wch_ch353_2s1p},
{ 0x1c00, 0x3250, 0x1c00, 0x3250, 0, 0, wch_ch382_2s1p},

/*
* More SUNIX variations. At least one of these has part number
Expand Down Expand Up @@ -494,6 +497,13 @@ static struct pciserial_board pci_parport_serial_boards[] = {
.base_baud = 115200,
.uart_offset = 8,
},
[wch_ch382_2s1p] = {
.flags = FL_BASE0,
.num_ports = 2,
.base_baud = 115200,
.uart_offset = 8,
.first_offset = 0xC0,
},
[sunix_2s1p] = {
.flags = FL_BASE0|FL_BASE_BARS,
.num_ports = 2,
Expand Down
4 changes: 2 additions & 2 deletions drivers/tty/ehv_bytechan.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ static int __init ehv_bc_console_init(void)
* handle for udbg.
*/
if (stdout_bc != CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE)
pr_warning("ehv-bc: udbg handle %u is not the stdout handle\n",
CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE);
pr_warn("ehv-bc: udbg handle %u is not the stdout handle\n",
CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE);
#endif

/* add_preferred_console() must be called before register_console(),
Expand Down
6 changes: 3 additions & 3 deletions drivers/tty/goldfish.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ static struct tty_driver *goldfish_tty_console_device(struct console *c,

static int goldfish_tty_console_setup(struct console *co, char *options)
{
if ((unsigned)co->index > goldfish_tty_line_count)
if ((unsigned)co->index >= goldfish_tty_line_count)
return -ENODEV;
if (goldfish_ttys[co->index].base == 0)
if (!goldfish_ttys[co->index].base)
return -ENODEV;
return 0;
}
Expand Down Expand Up @@ -317,7 +317,7 @@ static int goldfish_tty_remove(struct platform_device *pdev)
unregister_console(&qtty->console);
tty_unregister_device(goldfish_tty_driver, pdev->id);
iounmap(qtty->base);
qtty->base = 0;
qtty->base = NULL;
free_irq(qtty->irq, pdev);
goldfish_tty_current_line_count--;
if (goldfish_tty_current_line_count == 0)
Expand Down
2 changes: 1 addition & 1 deletion drivers/tty/hvc/hvcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ static int __init hvcs_module_init(void)
*/
rc = driver_create_file(&(hvcs_vio_driver.driver), &driver_attr_rescan);
if (rc)
pr_warning(KERN_ERR "HVCS: Failed to create rescan file (err %d)\n", rc);
pr_warning("HVCS: Failed to create rescan file (err %d)\n", rc);

return 0;
}
Expand Down
3 changes: 1 addition & 2 deletions drivers/tty/hvc/hvsi_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,7 @@ void hvsilib_close(struct hvsi_priv *pv, struct hvc_struct *hp)
hvsi_send_close(pv);
}

if (pv->tty)
tty_kref_put(pv->tty);
tty_kref_put(pv->tty);
pv->tty = NULL;
}

Expand Down
Loading

0 comments on commit 37da7bb

Please sign in to comment.