Skip to content

Commit c6bd5bc

Browse files
committed
Merge tag 'tty-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull TTY/Serial merge from Greg Kroah-Hartman: "Here's the big tty/serial tree set of changes for 3.8-rc1. Contained in here is a bunch more reworks of the tty port layer from Jiri and bugfixes from Alan, along with a number of other tty and serial driver updates by the various driver authors. Also, Jiri has been coerced^Wconvinced to be the co-maintainer of the TTY layer, which is much appreciated by me. All of these have been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fixed up some trivial conflicts in the staging tree, due to the fwserial driver having come in both ways (but fixed up a bit in the serial tree), and the ioctl handling in the dgrp driver having been done slightly differently (staging tree got that one right, and removed both TIOCGSOFTCAR and TIOCSSOFTCAR). * tag 'tty-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (146 commits) staging: sb105x: fix potential NULL pointer dereference in mp_chars_in_buffer() staging/fwserial: Remove superfluous free staging/fwserial: Use WARN_ONCE when port table is corrupted staging/fwserial: Destruct embedded tty_port on teardown staging/fwserial: Fix build breakage when !CONFIG_BUG staging: fwserial: Add TTY-over-Firewire serial driver drivers/tty/serial/serial_core.c: clean up HIGH_BITS_OFFSET usage staging: dgrp: dgrp_tty.c: Audit the return values of get/put_user() staging: dgrp: dgrp_tty.c: Remove the TIOCSSOFTCAR ioctl handler from dgrp driver serial: ifx6x60: Add modem power off function in the platform reboot process serial: mxs-auart: unmap the scatter list before we copy the data serial: mxs-auart: disable the Receive Timeout Interrupt when DMA is enabled serial: max310x: Setup missing "can_sleep" field for GPIO tty/serial: fix ifx6x60.c declaration warning serial: samsung: add devicetree properties for non-Exynos SoCs serial: samsung: fix potential soft lockup during uart write tty: vt: Remove redundant null check before kfree. tty/8250 Add check for pci_ioremap_bar failure tty/8250 Add support for Commtech's Fastcom Async-335 and Fastcom Async-PCIe cards tty/8250 Add XR17D15x devices to the exar_handle_irq override ...
2 parents 8966961 + b0ab023 commit c6bd5bc

166 files changed

Lines changed: 8146 additions & 1782 deletions

File tree

Some content is hidden

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

Documentation/ABI/testing/sysfs-tty

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,115 @@ Description:
2626
UART port in serial_core, that is bound to TTY like ttyS0.
2727
uartclk = 16 * baud_base
2828

29+
These sysfs values expose the TIOCGSERIAL interface via
30+
sysfs rather than via ioctls.
31+
32+
What: /sys/class/tty/ttyS0/type
33+
Date: October 2012
34+
Contact: Alan Cox <alan@linux.intel.com>
35+
Description:
36+
Shows the current tty type for this port.
37+
38+
These sysfs values expose the TIOCGSERIAL interface via
39+
sysfs rather than via ioctls.
40+
41+
What: /sys/class/tty/ttyS0/line
42+
Date: October 2012
43+
Contact: Alan Cox <alan@linux.intel.com>
44+
Description:
45+
Shows the current tty line number for this port.
46+
47+
These sysfs values expose the TIOCGSERIAL interface via
48+
sysfs rather than via ioctls.
49+
50+
What: /sys/class/tty/ttyS0/port
51+
Date: October 2012
52+
Contact: Alan Cox <alan@linux.intel.com>
53+
Description:
54+
Shows the current tty port I/O address for this port.
55+
56+
These sysfs values expose the TIOCGSERIAL interface via
57+
sysfs rather than via ioctls.
58+
59+
What: /sys/class/tty/ttyS0/irq
60+
Date: October 2012
61+
Contact: Alan Cox <alan@linux.intel.com>
62+
Description:
63+
Shows the current primary interrupt for this port.
64+
65+
These sysfs values expose the TIOCGSERIAL interface via
66+
sysfs rather than via ioctls.
67+
68+
What: /sys/class/tty/ttyS0/flags
69+
Date: October 2012
70+
Contact: Alan Cox <alan@linux.intel.com>
71+
Description:
72+
Show the tty port status flags for this port.
73+
74+
These sysfs values expose the TIOCGSERIAL interface via
75+
sysfs rather than via ioctls.
76+
77+
What: /sys/class/tty/ttyS0/xmit_fifo_size
78+
Date: October 2012
79+
Contact: Alan Cox <alan@linux.intel.com>
80+
Description:
81+
Show the transmit FIFO size for this port.
82+
83+
These sysfs values expose the TIOCGSERIAL interface via
84+
sysfs rather than via ioctls.
85+
86+
What: /sys/class/tty/ttyS0/close_delay
87+
Date: October 2012
88+
Contact: Alan Cox <alan@linux.intel.com>
89+
Description:
90+
Show the closing delay time for this port in ms.
91+
92+
These sysfs values expose the TIOCGSERIAL interface via
93+
sysfs rather than via ioctls.
94+
95+
What: /sys/class/tty/ttyS0/closing_wait
96+
Date: October 2012
97+
Contact: Alan Cox <alan@linux.intel.com>
98+
Description:
99+
Show the close wait time for this port in ms.
100+
101+
These sysfs values expose the TIOCGSERIAL interface via
102+
sysfs rather than via ioctls.
103+
104+
What: /sys/class/tty/ttyS0/custom_divisor
105+
Date: October 2012
106+
Contact: Alan Cox <alan@linux.intel.com>
107+
Description:
108+
Show the custom divisor if any that is set on this port.
109+
110+
These sysfs values expose the TIOCGSERIAL interface via
111+
sysfs rather than via ioctls.
112+
113+
What: /sys/class/tty/ttyS0/io_type
114+
Date: October 2012
115+
Contact: Alan Cox <alan@linux.intel.com>
116+
Description:
117+
Show the I/O type that is to be used with the iomem base
118+
address.
119+
120+
These sysfs values expose the TIOCGSERIAL interface via
121+
sysfs rather than via ioctls.
122+
123+
What: /sys/class/tty/ttyS0/iomem_base
124+
Date: October 2012
125+
Contact: Alan Cox <alan@linux.intel.com>
126+
Description:
127+
The I/O memory base for this port.
128+
129+
These sysfs values expose the TIOCGSERIAL interface via
130+
sysfs rather than via ioctls.
131+
132+
What: /sys/class/tty/ttyS0/iomem_reg_shift
133+
Date: October 2012
134+
Contact: Alan Cox <alan@linux.intel.com>
135+
Description:
136+
Show the register shift indicating the spacing to be used
137+
for accesses on this iomem address.
138+
139+
These sysfs values expose the TIOCGSERIAL interface via
140+
sysfs rather than via ioctls.

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@ Required properties:
66
- reg : Address and length of the register set for the device
77
- interrupts : Should contain the auart interrupt numbers
88

9+
Optional properties:
10+
- fsl,auart-dma-channel : The DMA channels, the first is for RX, the other
11+
is for TX. If you add this property, it also means that you
12+
will enable the DMA support for the auart.
13+
Note: due to the hardware bug in imx23(see errata : 2836),
14+
only the imx28 can enable the DMA support for the auart.
15+
916
Example:
1017
auart0: serial@8006a000 {
1118
compatible = "fsl,imx28-auart", "fsl,imx23-auart";
1219
reg = <0x8006a000 0x2000>;
1320
interrupts = <112 70 71>;
21+
fsl,auart-dma-channel = <8 9>;
1422
};
1523

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

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ Required properties:
1414
- "serial" if the port type is unknown.
1515
- reg : offset and length of the register set for the device.
1616
- interrupts : should contain uart interrupt.
17-
- clock-frequency : the input clock frequency for the UART.
17+
- clock-frequency : the input clock frequency for the UART
18+
or
19+
clocks phandle to refer to the clk used as per Documentation/devicetree
20+
/bindings/clock/clock-bindings.txt
1821

1922
Optional properties:
2023
- current-speed : the current active speed of the UART.

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7430,6 +7430,7 @@ K: ^Subject:.*(?i)trivial
74307430

74317431
TTY LAYER
74327432
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7433+
M: Jiri Slaby <jslaby@suse.cz>
74337434
S: Supported
74347435
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
74357436
F: drivers/tty/

arch/alpha/include/asm/ioctls.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@
9595
#define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */
9696
#define TIOCSIG _IOW('T',0x36, int) /* Generate signal on Pty slave */
9797
#define TIOCVHANGUP 0x5437
98+
#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */
99+
#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */
100+
#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */
98101

99102
#define TIOCSERCONFIG 0x5453
100103
#define TIOCSERGWILD 0x5454

arch/alpha/kernel/srmcons.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ static const struct tty_operations srmcons_ops = {
205205
static int __init
206206
srmcons_init(void)
207207
{
208-
tty_port_init(&srmcons_singleton.port);
209208
setup_timer(&srmcons_singleton.timer, srmcons_receive_chars,
210209
(unsigned long)&srmcons_singleton);
211210
if (srm_is_registered_console) {
@@ -215,6 +214,9 @@ srmcons_init(void)
215214
driver = alloc_tty_driver(MAX_SRM_CONSOLE_DEVICES);
216215
if (!driver)
217216
return -ENOMEM;
217+
218+
tty_port_init(&srmcons_singleton.port);
219+
218220
driver->driver_name = "srm";
219221
driver->name = "srm";
220222
driver->major = 0; /* dynamic */
@@ -227,6 +229,7 @@ srmcons_init(void)
227229
err = tty_register_driver(driver);
228230
if (err) {
229231
put_tty_driver(driver);
232+
tty_port_destroy(&srmcons_singleton.port);
230233
return err;
231234
}
232235
srmcons_driver = driver;

arch/arm/boot/dts/imx28.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,7 @@
799799
compatible = "fsl,imx28-auart", "fsl,imx23-auart";
800800
reg = <0x8006a000 0x2000>;
801801
interrupts = <112 70 71>;
802+
fsl,auart-dma-channel = <8 9>;
802803
clocks = <&clks 45>;
803804
status = "disabled";
804805
};

arch/arm/plat-omap/include/plat/serial.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,6 @@
109109
#define OMAP5UART4 OMAP4UART4
110110
#define ZOOM_UART 95 /* Only on zoom2/3 */
111111

112-
/* This is only used by 8250.c for omap1510 */
113-
#define is_omap_port(pt) ({int __ret = 0; \
114-
if ((pt)->port.mapbase == OMAP1_UART1_BASE || \
115-
(pt)->port.mapbase == OMAP1_UART2_BASE || \
116-
(pt)->port.mapbase == OMAP1_UART3_BASE) \
117-
__ret = 1; \
118-
__ret; \
119-
})
120-
121112
#ifndef __ASSEMBLER__
122113

123114
struct omap_board_data;

arch/ia64/hp/sim/simserial.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ static int __init simrs_init(void)
555555
return 0;
556556
err_free_tty:
557557
put_tty_driver(hp_simserial_driver);
558+
tty_port_destroy(&state->port);
558559
return retval;
559560
}
560561

arch/m68k/emu/nfcon.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ static int __init nfcon_init(void)
120120
{
121121
int res;
122122

123-
tty_port_init(&nfcon_tty_port);
124-
125123
stderr_id = nf_get_id("NF_STDERR");
126124
if (!stderr_id)
127125
return -ENODEV;
@@ -130,6 +128,8 @@ static int __init nfcon_init(void)
130128
if (!nfcon_tty_driver)
131129
return -ENOMEM;
132130

131+
tty_port_init(&nfcon_tty_port);
132+
133133
nfcon_tty_driver->driver_name = "nfcon";
134134
nfcon_tty_driver->name = "nfcon";
135135
nfcon_tty_driver->type = TTY_DRIVER_TYPE_SYSTEM;
@@ -143,6 +143,7 @@ static int __init nfcon_init(void)
143143
if (res) {
144144
pr_err("failed to register nfcon tty driver\n");
145145
put_tty_driver(nfcon_tty_driver);
146+
tty_port_destroy(&nfcon_tty_port);
146147
return res;
147148
}
148149

@@ -157,6 +158,7 @@ static void __exit nfcon_exit(void)
157158
unregister_console(&nf_console);
158159
tty_unregister_driver(nfcon_tty_driver);
159160
put_tty_driver(nfcon_tty_driver);
161+
tty_port_destroy(&nfcon_tty_port);
160162
}
161163

162164
module_init(nfcon_init);

0 commit comments

Comments
 (0)