aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-10-29 13:42:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-10-29 13:42:20 -0400
commit5bd4af34a09a381a0f8b1552684650698937e6b0 (patch)
treef539764b25c09e6e1d181854e281c14c162fc30c
parent738b04fba18d35cd352b7b15afefb8a7b798648e (diff)
parent59eaeba63a171127a90bb76187536ba66076af40 (diff)
Merge tag 'tty-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial updates from Greg KH: "Here is the big tty and serial pull request for 4.20-rc1 Lots of little things here, including a merge from the SPI tree in order to keep things simpler for everyone to sync around for one platform. Major stuff is: - tty buffer clearing after use - atmel_serial fixes and additions - xilinx uart driver updates and of course, lots of tiny fixes and additions to individual serial drivers. All of these have been in linux-next with no reported issues for a while" * tag 'tty-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (66 commits) of: base: Change logic in of_alias_get_alias_list() of: base: Fix english spelling in of_alias_get_alias_list() serial: sh-sci: do not warn if DMA transfers are not supported serial: uartps: Do not allow use aliases >= MAX_UART_INSTANCES tty: check name length in tty_find_polling_driver() serial: sh-sci: Add r8a77990 support tty: wipe buffer if not echoing data tty: wipe buffer. serial: fsl_lpuart: Remove the alias node dependence TTY: sn_console: Replace spin_is_locked() with spin_trylock() Revert "serial:serial_core: Allow use of CTS for PPS line discipline" serial: 8250_uniphier: add auto-flow-control support serial: 8250_uniphier: flatten probe function serial: 8250_uniphier: remove unused "fifo-size" property dt-bindings: serial: sh-sci: Document r8a7744 bindings serial: uartps: Fix missing unlock on error in cdns_get_id() tty/serial: atmel: add ISO7816 support tty/serial_core: add ISO7816 infrastructure serial:serial_core: Allow use of CTS for PPS line discipline serial: docs: Fix filename for serial reference implementation ...
-rw-r--r--Documentation/devicetree/bindings/serial/renesas,sci-serial.txt6
-rw-r--r--Documentation/devicetree/bindings/serial/uniphier-uart.txt3
-rw-r--r--Documentation/serial/driver2
-rw-r--r--Documentation/serial/serial-iso7816.txt83
-rw-r--r--arch/alpha/include/uapi/asm/ioctls.h2
-rw-r--r--arch/mips/include/uapi/asm/ioctls.h2
-rw-r--r--arch/parisc/include/uapi/asm/ioctls.h2
-rw-r--r--arch/powerpc/include/uapi/asm/ioctls.h2
-rw-r--r--arch/sh/include/uapi/asm/ioctls.h2
-rw-r--r--arch/sparc/include/uapi/asm/ioctls.h2
-rw-r--r--arch/xtensa/include/uapi/asm/ioctls.h2
-rw-r--r--drivers/of/base.c54
-rw-r--r--drivers/tty/ehv_bytechan.c12
-rw-r--r--drivers/tty/n_tty.c20
-rw-r--r--drivers/tty/serial/8250/8250_core.c6
-rw-r--r--drivers/tty/serial/8250/8250_of.c22
-rw-r--r--drivers/tty/serial/8250/8250_port.c29
-rw-r--r--drivers/tty/serial/8250/8250_uniphier.c62
-rw-r--r--drivers/tty/serial/8250/Kconfig2
-rw-r--r--drivers/tty/serial/atmel_serial.c190
-rw-r--r--drivers/tty/serial/atmel_serial.h3
-rw-r--r--drivers/tty/serial/cpm_uart/cpm_uart_core.c8
-rw-r--r--drivers/tty/serial/fsl_lpuart.c12
-rw-r--r--drivers/tty/serial/imx.c38
-rw-r--r--drivers/tty/serial/kgdboc.c46
-rw-r--r--drivers/tty/serial/mxs-auart.c3
-rw-r--r--drivers/tty/serial/pmac_zilog.c8
-rw-r--r--drivers/tty/serial/qcom_geni_serial.c69
-rw-r--r--drivers/tty/serial/samsung.c8
-rw-r--r--drivers/tty/serial/sc16is7xx.c47
-rw-r--r--drivers/tty/serial/serial_core.c60
-rw-r--r--drivers/tty/serial/sh-sci.c9
-rw-r--r--drivers/tty/serial/sn_console.c15
-rw-r--r--drivers/tty/serial/sprd_serial.c98
-rw-r--r--drivers/tty/serial/uartlite.c71
-rw-r--r--drivers/tty/serial/xilinx_uartps.c303
-rw-r--r--drivers/tty/tty_buffer.c13
-rw-r--r--drivers/tty/tty_io.c2
-rw-r--r--drivers/tty/tty_port.c7
-rw-r--r--include/linux/of.h10
-rw-r--r--include/linux/serial_core.h3
-rw-r--r--include/uapi/asm-generic/ioctls.h2
-rw-r--r--include/uapi/linux/serial.h17
43 files changed, 977 insertions, 380 deletions
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
index eaca9da79d83..e52e16c6bc57 100644
--- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -14,6 +14,10 @@ Required properties:
14 - "renesas,scifa-r8a7743" for R8A7743 (RZ/G1M) SCIFA compatible UART. 14 - "renesas,scifa-r8a7743" for R8A7743 (RZ/G1M) SCIFA compatible UART.
15 - "renesas,scifb-r8a7743" for R8A7743 (RZ/G1M) SCIFB compatible UART. 15 - "renesas,scifb-r8a7743" for R8A7743 (RZ/G1M) SCIFB compatible UART.
16 - "renesas,hscif-r8a7743" for R8A7743 (RZ/G1M) HSCIF compatible UART. 16 - "renesas,hscif-r8a7743" for R8A7743 (RZ/G1M) HSCIF compatible UART.
17 - "renesas,scif-r8a7744" for R8A7744 (RZ/G1N) SCIF compatible UART.
18 - "renesas,scifa-r8a7744" for R8A7744 (RZ/G1N) SCIFA compatible UART.
19 - "renesas,scifb-r8a7744" for R8A7744 (RZ/G1N) SCIFB compatible UART.
20 - "renesas,hscif-r8a7744" for R8A7744 (RZ/G1N) HSCIF compatible UART.
17 - "renesas,scif-r8a7745" for R8A7745 (RZ/G1E) SCIF compatible UART. 21 - "renesas,scif-r8a7745" for R8A7745 (RZ/G1E) SCIF compatible UART.
18 - "renesas,scifa-r8a7745" for R8A7745 (RZ/G1E) SCIFA compatible UART. 22 - "renesas,scifa-r8a7745" for R8A7745 (RZ/G1E) SCIFA compatible UART.
19 - "renesas,scifb-r8a7745" for R8A7745 (RZ/G1E) SCIFB compatible UART. 23 - "renesas,scifb-r8a7745" for R8A7745 (RZ/G1E) SCIFB compatible UART.
@@ -50,6 +54,8 @@ Required properties:
50 - "renesas,hscif-r8a77970" for R8A77970 (R-Car V3M) HSCIF compatible UART. 54 - "renesas,hscif-r8a77970" for R8A77970 (R-Car V3M) HSCIF compatible UART.
51 - "renesas,scif-r8a77980" for R8A77980 (R-Car V3H) SCIF compatible UART. 55 - "renesas,scif-r8a77980" for R8A77980 (R-Car V3H) SCIF compatible UART.
52 - "renesas,hscif-r8a77980" for R8A77980 (R-Car V3H) HSCIF compatible UART. 56 - "renesas,hscif-r8a77980" for R8A77980 (R-Car V3H) HSCIF compatible UART.
57 - "renesas,scif-r8a77990" for R8A77990 (R-Car E3) SCIF compatible UART.
58 - "renesas,hscif-r8a77990" for R8A77990 (R-Car E3) HSCIF compatible UART.
53 - "renesas,scif-r8a77995" for R8A77995 (R-Car D3) SCIF compatible UART. 59 - "renesas,scif-r8a77995" for R8A77995 (R-Car D3) SCIF compatible UART.
54 - "renesas,hscif-r8a77995" for R8A77995 (R-Car D3) HSCIF compatible UART. 60 - "renesas,hscif-r8a77995" for R8A77995 (R-Car D3) HSCIF compatible UART.
55 - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART. 61 - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
diff --git a/Documentation/devicetree/bindings/serial/uniphier-uart.txt b/Documentation/devicetree/bindings/serial/uniphier-uart.txt
index 0b3892a7a528..7a1bf02bb869 100644
--- a/Documentation/devicetree/bindings/serial/uniphier-uart.txt
+++ b/Documentation/devicetree/bindings/serial/uniphier-uart.txt
@@ -7,7 +7,7 @@ Required properties:
7- clocks: phandle to the input clock. 7- clocks: phandle to the input clock.
8 8
9Optional properties: 9Optional properties:
10- fifo-size: the RX/TX FIFO size. Defaults to 64 if not specified. 10-auto-flow-control: enable automatic flow control support.
11 11
12Example: 12Example:
13 aliases { 13 aliases {
@@ -19,5 +19,4 @@ Example:
19 reg = <0x54006800 0x40>; 19 reg = <0x54006800 0x40>;
20 interrupts = <0 33 4>; 20 interrupts = <0 33 4>;
21 clocks = <&uart_clk>; 21 clocks = <&uart_clk>;
22 fifo-size = <64>;
23 }; 22 };
diff --git a/Documentation/serial/driver b/Documentation/serial/driver
index da193e092fc3..86e47c19a924 100644
--- a/Documentation/serial/driver
+++ b/Documentation/serial/driver
@@ -7,7 +7,7 @@ This document is meant as a brief overview of some aspects of the new serial
7driver. It is not complete, any questions you have should be directed to 7driver. It is not complete, any questions you have should be directed to
8<rmk@arm.linux.org.uk> 8<rmk@arm.linux.org.uk>
9 9
10The reference implementation is contained within amba_pl011.c. 10The reference implementation is contained within amba-pl011.c.
11 11
12 12
13 13
diff --git a/Documentation/serial/serial-iso7816.txt b/Documentation/serial/serial-iso7816.txt
new file mode 100644
index 000000000000..3193d24a2b0f
--- /dev/null
+++ b/Documentation/serial/serial-iso7816.txt
@@ -0,0 +1,83 @@
1 ISO7816 SERIAL COMMUNICATIONS
2
31. INTRODUCTION
4
5 ISO/IEC7816 is a series of standards specifying integrated circuit cards (ICC)
6 also known as smart cards.
7
82. HARDWARE-RELATED CONSIDERATIONS
9
10 Some CPUs/UARTs (e.g., Microchip AT91) contain a built-in mode capable of
11 handling communication with a smart card.
12
13 For these microcontrollers, the Linux driver should be made capable of
14 working in both modes, and proper ioctls (see later) should be made
15 available at user-level to allow switching from one mode to the other, and
16 vice versa.
17
183. DATA STRUCTURES ALREADY AVAILABLE IN THE KERNEL
19
20 The Linux kernel provides the serial_iso7816 structure (see [1]) to handle
21 ISO7816 communications. This data structure is used to set and configure
22 ISO7816 parameters in ioctls.
23
24 Any driver for devices capable of working both as RS232 and ISO7816 should
25 implement the iso7816_config callback in the uart_port structure. The
26 serial_core calls iso7816_config to do the device specific part in response
27 to TIOCGISO7816 and TIOCSISO7816 ioctls (see below). The iso7816_config
28 callback receives a pointer to struct serial_iso7816.
29
304. USAGE FROM USER-LEVEL
31
32 From user-level, ISO7816 configuration can be get/set using the previous
33 ioctls. For instance, to set ISO7816 you can use the following code:
34
35 #include <linux/serial.h>
36
37 /* Include definition for ISO7816 ioctls: TIOCSISO7816 and TIOCGISO7816 */
38 #include <sys/ioctl.h>
39
40 /* Open your specific device (e.g., /dev/mydevice): */
41 int fd = open ("/dev/mydevice", O_RDWR);
42 if (fd < 0) {
43 /* Error handling. See errno. */
44 }
45
46 struct serial_iso7816 iso7816conf;
47
48 /* Reserved fields as to be zeroed */
49 memset(&iso7816conf, 0, sizeof(iso7816conf));
50
51 /* Enable ISO7816 mode: */
52 iso7816conf.flags |= SER_ISO7816_ENABLED;
53
54 /* Select the protocol: */
55 /* T=0 */
56