Skip to content

Commit 37da7bb

Browse files
committed
Merge tag 'tty-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/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. ...
2 parents e7cf773 + dd63af1 commit 37da7bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+4755
-1596
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
* BCM63xx UART
2+
3+
Required properties:
4+
5+
- compatible: "brcm,bcm6345-uart"
6+
7+
- reg: The base address of the UART register bank.
8+
9+
- interrupts: A single interrupt specifier.
10+
11+
- clocks: Clock driving the hardware; used to figure out the baud rate
12+
divisor.
13+
14+
Example:
15+
16+
uart0: serial@14e00520 {
17+
compatible = "brcm,bcm6345-uart";
18+
reg = <0x14e00520 0x18>;
19+
interrupt-parent = <&periph_intc>;
20+
interrupts = <2>;
21+
clocks = <&periph_clk>;
22+
};
23+
24+
clocks {
25+
periph_clk: periph_clk@0 {
26+
compatible = "fixed-clock";
27+
#clock-cells = <0>;
28+
clock-frequency = <54000000>;
29+
};
30+
};

Documentation/devicetree/bindings/serial/fsl-mxs-auart.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@ Required properties:
1111
- dma-names: "rx" for RX channel, "tx" for TX channel.
1212

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

1722
Example:
1823
auart0: serial@8006a000 {
@@ -21,6 +26,9 @@ auart0: serial@8006a000 {
2126
interrupts = <112>;
2227
dmas = <&dma_apbx 8>, <&dma_apbx 9>;
2328
dma-names = "rx", "tx";
29+
cts-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
30+
dsr-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
31+
dcd-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
2432
};
2533

2634
Note: Each auart port should have an alias correctly numbered in "aliases"

Documentation/devicetree/bindings/serial/of-serial.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Required properties:
1010
- "ns16850"
1111
- "nvidia,tegra20-uart"
1212
- "nxp,lpc3220-uart"
13+
- "ralink,rt2880-uart"
1314
- "ibm,qpace-nwp-serial"
1415
- "altr,16550-FIFO32"
1516
- "altr,16550-FIFO64"

Documentation/devicetree/bindings/serial/pl011.txt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,35 @@ Required properties:
66
- interrupts: exactly one interrupt specifier
77

88
Optional properties:
9-
- pinctrl: When present, must have one state named "default",
9+
- pinctrl:
10+
When present, must have one state named "default",
1011
and may contain a second name named "sleep". The former
1112
state sets up pins for ordinary operation whereas
1213
the latter state will put the associated pins to sleep
1314
when the UART is unused
14-
- clocks: When present, the first clock listed must correspond to
15+
- clocks:
16+
When present, the first clock listed must correspond to
1517
the clock named UARTCLK on the IP block, i.e. the clock
1618
to the external serial line, whereas the second clock
1719
must correspond to the PCLK clocking the internal logic
1820
of the block. Just listing one clock (the first one) is
1921
deprecated.
20-
- clocks-names: When present, the first clock listed must be named
22+
- clocks-names:
23+
When present, the first clock listed must be named
2124
"uartclk" and the second clock listed must be named
2225
"apb_pclk"
23-
- dmas: When present, may have one or two dma channels.
26+
- dmas:
27+
When present, may have one or two dma channels.
2428
The first one must be named "rx", the second one
2529
must be named "tx".
30+
- auto-poll:
31+
Enables polling when using RX DMA.
32+
- poll-rate-ms:
33+
Rate at which poll occurs when auto-poll is set,
34+
default 100ms.
35+
- poll-timeout-ms:
36+
Poll timeout when auto-poll is set, default
37+
3000ms.
2638

2739
See also bindings/arm/primecell.txt
2840

Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,52 @@ Optional properties:
2727
- dmas: Should contain dma specifiers for transmit and receive channels
2828
- dma-names: Should contain "tx" for transmit and "rx" for receive channels
2929

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

32-
A uartdm v1.4 device with dma capabilities.
33-
34-
serial@f991e000 {
35-
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
36-
reg = <0xf991e000 0x1000>;
37-
interrupts = <0 108 0x0>;
38-
clocks = <&blsp1_uart2_apps_cxc>, <&blsp1_ahb_cxc>;
39-
clock-names = "core", "iface";
40-
dmas = <&dma0 0>, <&dma0 1>;
41-
dma-names = "tx", "rx";
42-
};
43-
44-
A uartdm v1.3 device without dma capabilities and part of a GSBI complex.
45-
46-
serial@19c40000 {
47-
compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
48-
reg = <0x19c40000 0x1000>,
49-
<0x19c00000 0x1000>;
50-
interrupts = <0 195 0x0>;
51-
clocks = <&gsbi5_uart_cxc>, <&gsbi5_ahb_cxc>;
52-
clock-names = "core", "iface";
53-
};
37+
- A uartdm v1.4 device with dma capabilities.
38+
39+
serial@f991e000 {
40+
compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm";
41+
reg = <0xf991e000 0x1000>;
42+
interrupts = <0 108 0x0>;
43+
clocks = <&blsp1_uart2_apps_cxc>, <&blsp1_ahb_cxc>;
44+
clock-names = "core", "iface";
45+
dmas = <&dma0 0>, <&dma0 1>;
46+
dma-names = "tx", "rx";
47+
};
48+
49+
- A uartdm v1.3 device without dma capabilities and part of a GSBI complex.
50+
51+
serial@19c40000 {
52+
compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm";
53+
reg = <0x19c40000 0x1000>,
54+
<0x19c00000 0x1000>;
55+
interrupts = <0 195 0x0>;
56+
clocks = <&gsbi5_uart_cxc>, <&gsbi5_ahb_cxc>;
57+
clock-names = "core", "iface";
58+
};
59+
60+
- serialN alias.
61+
62+
aliases {
63+
serial0 = &uarta;
64+
serial1 = &uartc;
65+
serial2 = &uartb;
66+
};
67+
68+
uarta: serial@12490000 {
69+
status = "ok";
70+
};
71+
72+
uartb: serial@16340000 {
73+
status = "ok";
74+
};
75+
76+
uartc: serial@1a240000 {
77+
status = "ok";
78+
};

Documentation/devicetree/bindings/serial/renesas,sci-serial.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ Required properties:
44

55
- compatible: Must contain one of the following:
66

7-
- "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
8-
- "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
7+
- "renesas,scif-r7s72100" for R7S72100 (RZ/A1H) SCIF compatible UART.
98
- "renesas,scifa-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFA compatible UART.
109
- "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART.
1110
- "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART.
@@ -20,6 +19,12 @@ Required properties:
2019
- "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
2120
- "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART.
2221
- "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART.
22+
- "renesas,scif-r8a7794" for R8A7794 (R-Car E2) SCIF compatible UART.
23+
- "renesas,scifa-r8a7794" for R8A7794 (R-Car E2) SCIFA compatible UART.
24+
- "renesas,scifb-r8a7794" for R8A7794 (R-Car E2) SCIFB compatible UART.
25+
- "renesas,hscif-r8a7794" for R8A7794 (R-Car E2) HSCIF compatible UART.
26+
- "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
27+
- "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
2328
- "renesas,scif" for generic SCIF compatible UART.
2429
- "renesas,scifa" for generic SCIFA compatible UART.
2530
- "renesas,scifb" for generic SCIFB compatible UART.

Documentation/devicetree/bindings/serial/sirf-uart.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
* CSR SiRFprimaII/atlasVI Universal Synchronous Asynchronous Receiver/Transmitter *
22

33
Required properties:
4-
- compatible : Should be "sirf,prima2-uart" or "sirf, prima2-usp-uart"
4+
- compatible : Should be "sirf,prima2-uart", "sirf, prima2-usp-uart",
5+
"sirf,marco-uart" or "sirf,marco-bt-uart" which means
6+
uart located in BT module and used for BT.
57
- reg : Offset and length of the register set for the device
68
- interrupts : Should contain uart interrupt
79
- fifosize : Should define hardware rx/tx fifo size
@@ -31,3 +33,15 @@ usp@b0090000 {
3133
rts-gpios = <&gpio 15 0>;
3234
cts-gpios = <&gpio 46 0>;
3335
};
36+
37+
for uart use in BT module,
38+
uart6: uart@11000000 {
39+
cell-index = <6>;
40+
compatible = "sirf,marco-bt-uart", "sirf,marco-uart";
41+
reg = <0x11000000 0x1000>;
42+
interrupts = <0 100 0>;
43+
clocks = <&clks 138>, <&clks 140>, <&clks 141>;
44+
clock-names = "uart", "general", "noc";
45+
fifosize = <128>;
46+
status = "disabled";
47+
}

Documentation/serial/driver

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ The core driver uses the info->tmpbuf_sem lock to prevent multi-threaded
5959
access to the info->tmpbuf bouncebuffer used for port writes.
6060

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

6466

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

251-
Locking: none.
253+
Locking: caller holds port->mutex
252254
Interrupts: caller dependent.
253255
This call must not sleep
254256

MAINTAINERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8026,6 +8026,12 @@ S: Maintained
80268026
F: Documentation/serial/rocket.txt
80278027
F: drivers/tty/rocket*
80288028

8029+
ROCKETPORT EXPRESS/INFINITY DRIVER
8030+
M: Kevin Cernekee <cernekee@gmail.com>
8031+
L: linux-serial@vger.kernel.org
8032+
S: Odd Fixes
8033+
F: drivers/tty/serial/rp2.*
8034+
80298035
ROSE NETWORK LAYER
80308036
M: Ralf Baechle <ralf@linux-mips.org>
80318037
L: linux-hams@vger.kernel.org

arch/blackfin/include/asm/bfin_serial.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
#ifndef __BFIN_ASM_SERIAL_H__
1010
#define __BFIN_ASM_SERIAL_H__
1111

12+
#include <linux/circ_buf.h>
1213
#include <linux/serial_core.h>
1314
#include <linux/spinlock.h>
15+
#include <linux/timer.h>
16+
#include <linux/workqueue.h>
1417
#include <mach/anomaly.h>
1518
#include <mach/bfin_serial.h>
1619

@@ -25,10 +28,6 @@
2528
# endif
2629
#endif
2730

28-
struct circ_buf;
29-
struct timer_list;
30-
struct work_struct;
31-
3231
struct bfin_serial_port {
3332
struct uart_port port;
3433
unsigned int old_status;

arch/um/drivers/line.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ static irqreturn_t winch_interrupt(int irq, void *data)
632632
int fd = winch->fd;
633633
int err;
634634
char c;
635+
struct pid *pgrp;
635636

636637
if (fd != -1) {
637638
err = generic_read(fd, &c, NULL);
@@ -657,7 +658,10 @@ static irqreturn_t winch_interrupt(int irq, void *data)
657658
if (line != NULL) {
658659
chan_window_size(line, &tty->winsize.ws_row,
659660
&tty->winsize.ws_col);
660-
kill_pgrp(tty->pgrp, SIGWINCH, 1);
661+
pgrp = tty_get_pgrp(tty);
662+
if (pgrp)
663+
kill_pgrp(pgrp, SIGWINCH, 1);
664+
put_pid(pgrp);
661665
}
662666
tty_kref_put(tty);
663667
}

drivers/parport/parport_serial.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ enum parport_pc_pci_cards {
6464
timedia_9079c,
6565
wch_ch353_1s1p,
6666
wch_ch353_2s1p,
67+
wch_ch382_2s1p,
6768
sunix_2s1p,
6869
};
6970

@@ -151,6 +152,7 @@ static struct parport_pc_pci cards[] = {
151152
/* timedia_9079c */ { 1, { { 2, 3 }, } },
152153
/* wch_ch353_1s1p*/ { 1, { { 1, -1}, } },
153154
/* wch_ch353_2s1p*/ { 1, { { 2, -1}, } },
155+
/* wch_ch382_2s1p*/ { 1, { { 2, -1}, } },
154156
/* sunix_2s1p */ { 1, { { 3, -1 }, } },
155157
};
156158

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

261264
/*
262265
* More SUNIX variations. At least one of these has part number
@@ -494,6 +497,13 @@ static struct pciserial_board pci_parport_serial_boards[] = {
494497
.base_baud = 115200,
495498
.uart_offset = 8,
496499
},
500+
[wch_ch382_2s1p] = {
501+
.flags = FL_BASE0,
502+
.num_ports = 2,
503+
.base_baud = 115200,
504+
.uart_offset = 8,
505+
.first_offset = 0xC0,
506+
},
497507
[sunix_2s1p] = {
498508
.flags = FL_BASE0|FL_BASE_BARS,
499509
.num_ports = 2,

drivers/tty/ehv_bytechan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ static int __init ehv_bc_console_init(void)
309309
* handle for udbg.
310310
*/
311311
if (stdout_bc != CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE)
312-
pr_warning("ehv-bc: udbg handle %u is not the stdout handle\n",
313-
CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE);
312+
pr_warn("ehv-bc: udbg handle %u is not the stdout handle\n",
313+
CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE);
314314
#endif
315315

316316
/* add_preferred_console() must be called before register_console(),

drivers/tty/goldfish.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ static struct tty_driver *goldfish_tty_console_device(struct console *c,
155155

156156
static int goldfish_tty_console_setup(struct console *co, char *options)
157157
{
158-
if ((unsigned)co->index > goldfish_tty_line_count)
158+
if ((unsigned)co->index >= goldfish_tty_line_count)
159159
return -ENODEV;
160-
if (goldfish_ttys[co->index].base == 0)
160+
if (!goldfish_ttys[co->index].base)
161161
return -ENODEV;
162162
return 0;
163163
}
@@ -317,7 +317,7 @@ static int goldfish_tty_remove(struct platform_device *pdev)
317317
unregister_console(&qtty->console);
318318
tty_unregister_device(goldfish_tty_driver, pdev->id);
319319
iounmap(qtty->base);
320-
qtty->base = 0;
320+
qtty->base = NULL;
321321
free_irq(qtty->irq, pdev);
322322
goldfish_tty_current_line_count--;
323323
if (goldfish_tty_current_line_count == 0)

drivers/tty/hvc/hvcs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ static int __init hvcs_module_init(void)
15751575
*/
15761576
rc = driver_create_file(&(hvcs_vio_driver.driver), &driver_attr_rescan);
15771577
if (rc)
1578-
pr_warning(KERN_ERR "HVCS: Failed to create rescan file (err %d)\n", rc);
1578+
pr_warning("HVCS: Failed to create rescan file (err %d)\n", rc);
15791579

15801580
return 0;
15811581
}

drivers/tty/hvc/hvsi_lib.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ void hvsilib_close(struct hvsi_priv *pv, struct hvc_struct *hp)
405405
hvsi_send_close(pv);
406406
}
407407

408-
if (pv->tty)
409-
tty_kref_put(pv->tty);
408+
tty_kref_put(pv->tty);
410409
pv->tty = NULL;
411410
}
412411

0 commit comments

Comments
 (0)