aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-06-26 18:53:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-26 18:53:22 -0400
commit8c7febe83915332276cab49e89f6580bb963fb9a (patch)
treec6ffa5fbdef402f8c6e2d75b19dcce813fd21ded /include
parent23908db413eccd77084b09c9b0a4451dfb0524c0 (diff)
parent71206b9f8120eb513c621d4f31906577bb658df3 (diff)
Merge tag 'tty-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver updates from Greg KH: "Here's the tty and serial driver patches for 4.2-rc1. A number of individual driver updates, some code cleanups, and other minor things, full details in the shortlog. All have been in linux-next for a while with no reported issues" * tag 'tty-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (152 commits) Doc: serial-rs485.txt: update RS485 driver interface Doc: tty.txt: remove mention of the BKL MAINTAINERS: tty: add serial docs directory serial: sprd: check for NULL after calling devm_clk_get serial: 8250_pci: Correct uartclk for xr17v35x expansion chips serial: 8250_pci: Add support for 12 port Exar boards serial: 8250_uniphier: add bindings document for UniPhier UART serial: core: cleanup in uart_get_baud_rate() serial: stm32-usart: Add STM32 USART Driver tty/serial: kill off set_irq_flags usage tty: move linux/gsmmux.h to uapi doc: dt: add documentation for nxp,lpc1850-uart serial: 8250: add LPC18xx/43xx UART driver serial: 8250_uniphier: add UniPhier serial driver serial: 8250_dw: support ACPI platforms with integrated DMA engine serial: of_serial: check the return value of clk_prepare_enable() serial: of_serial: use devm_clk_get() instead of clk_get() serial: earlycon: Add support for big-endian MMIO accesses serial: sirf: use hrtimer for data rx serial: sirf: correct the fifo empty_bit ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/console_struct.h1
-rw-r--r--include/linux/serial_8250.h3
-rw-r--r--include/linux/serial_core.h2
-rw-r--r--include/linux/serial_sci.h86
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/uapi/linux/Kbuild1
-rw-r--r--include/uapi/linux/gsmmux.h (renamed from include/linux/gsmmux.h)3
-rw-r--r--include/uapi/linux/serial_core.h3
-rw-r--r--include/uapi/linux/tty_flags.h2
9 files changed, 25 insertions, 78 deletions
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
index e859c98d1767..e329ee2667e1 100644
--- a/include/linux/console_struct.h
+++ b/include/linux/console_struct.h
@@ -104,6 +104,7 @@ struct vc_data {
104 unsigned int vc_resize_user; /* resize request from user */ 104 unsigned int vc_resize_user; /* resize request from user */
105 unsigned int vc_bell_pitch; /* Console bell pitch */ 105 unsigned int vc_bell_pitch; /* Console bell pitch */
106 unsigned int vc_bell_duration; /* Console bell duration */ 106 unsigned int vc_bell_duration; /* Console bell duration */
107 unsigned short vc_cur_blink_ms; /* Cursor blink duration */
107 struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */ 108 struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */
108 struct uni_pagedir *vc_uni_pagedir; 109 struct uni_pagedir *vc_uni_pagedir;
109 struct uni_pagedir **vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */ 110 struct uni_pagedir **vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index 78097e7a330a..ba82c07feb95 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -12,6 +12,7 @@
12#define _LINUX_SERIAL_8250_H 12#define _LINUX_SERIAL_8250_H
13 13
14#include <linux/serial_core.h> 14#include <linux/serial_core.h>
15#include <linux/serial_reg.h>
15#include <linux/platform_device.h> 16#include <linux/platform_device.h>
16 17
17/* 18/*
@@ -137,6 +138,8 @@ extern int early_serial_setup(struct uart_port *port);
137 138
138extern unsigned int serial8250_early_in(struct uart_port *port, int offset); 139extern unsigned int serial8250_early_in(struct uart_port *port, int offset);
139extern void serial8250_early_out(struct uart_port *port, int offset, int value); 140extern void serial8250_early_out(struct uart_port *port, int offset, int value);
141extern int early_serial8250_setup(struct earlycon_device *device,
142 const char *options);
140extern void serial8250_do_set_termios(struct uart_port *port, 143extern void serial8250_do_set_termios(struct uart_port *port,
141 struct ktermios *termios, struct ktermios *old); 144 struct ktermios *termios, struct ktermios *old);
142extern int serial8250_do_startup(struct uart_port *port); 145extern int serial8250_do_startup(struct uart_port *port);
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 025dad9dcde4..297d4fa1cfe5 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -35,7 +35,7 @@
35#define uart_console(port) \ 35#define uart_console(port) \
36 ((port)->cons && (port)->cons->index == (port)->line) 36 ((port)->cons && (port)->cons->index == (port)->line)
37#else 37#else
38#define uart_console(port) (0) 38#define uart_console(port) ({ (void)port; 0; })
39#endif 39#endif
40 40
41struct uart_port; 41struct uart_port;
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h
index 6c5e3bb282b0..7c536ac5be05 100644
--- a/include/linux/serial_sci.h
+++ b/include/linux/serial_sci.h
@@ -1,6 +1,7 @@
1#ifndef __LINUX_SERIAL_SCI_H 1#ifndef __LINUX_SERIAL_SCI_H
2#define __LINUX_SERIAL_SCI_H 2#define __LINUX_SERIAL_SCI_H
3 3
4#include <linux/bitops.h>
4#include <linux/serial_core.h> 5#include <linux/serial_core.h>
5#include <linux/sh_dma.h> 6#include <linux/sh_dma.h>
6 7
@@ -10,59 +11,16 @@
10 11
11#define SCIx_NOT_SUPPORTED (-1) 12#define SCIx_NOT_SUPPORTED (-1)
12 13
13/* SCSMR (Serial Mode Register) */
14#define SCSMR_CHR (1 << 6) /* 7-bit Character Length */
15#define SCSMR_PE (1 << 5) /* Parity Enable */
16#define SCSMR_ODD (1 << 4) /* Odd Parity */
17#define SCSMR_STOP (1 << 3) /* Stop Bit Length */
18#define SCSMR_CKS 0x0003 /* Clock Select */
19
20/* Serial Control Register (@ = not supported by all parts) */ 14/* Serial Control Register (@ = not supported by all parts) */
21#define SCSCR_TIE (1 << 7) /* Transmit Interrupt Enable */ 15#define SCSCR_TIE BIT(7) /* Transmit Interrupt Enable */
22#define SCSCR_RIE (1 << 6) /* Receive Interrupt Enable */ 16#define SCSCR_RIE BIT(6) /* Receive Interrupt Enable */
23#define SCSCR_TE (1 << 5) /* Transmit Enable */ 17#define SCSCR_TE BIT(5) /* Transmit Enable */
24#define SCSCR_RE (1 << 4) /* Receive Enable */ 18#define SCSCR_RE BIT(4) /* Receive Enable */
25#define SCSCR_REIE (1 << 3) /* Receive Error Interrupt Enable @ */ 19#define SCSCR_REIE BIT(3) /* Receive Error Interrupt Enable @ */
26#define SCSCR_TOIE (1 << 2) /* Timeout Interrupt Enable @ */ 20#define SCSCR_TOIE BIT(2) /* Timeout Interrupt Enable @ */
27#define SCSCR_CKE1 (1 << 1) /* Clock Enable 1 */ 21#define SCSCR_CKE1 BIT(1) /* Clock Enable 1 */
28#define SCSCR_CKE0 (1 << 0) /* Clock Enable 0 */ 22#define SCSCR_CKE0 BIT(0) /* Clock Enable 0 */
29/* SCIFA/SCIFB only */ 23
30#define SCSCR_TDRQE (1 << 15) /* Tx Data Transfer Request Enable */
31#define SCSCR_RDRQE (1 << 14) /* Rx Data Transfer Request Enable */
32
33/* SCxSR (Serial Status Register) on SCI */
34#define SCI_TDRE 0x80 /* Transmit Data Register Empty */
35#define SCI_RDRF 0x40 /* Receive Data Register Full */
36#define SCI_ORER 0x20 /* Overrun Error */
37#define SCI_FER 0x10 /* Framing Error */
38#define SCI_PER 0x08 /* Parity Error */
39#define SCI_TEND 0x04 /* Transmit End */
40
41#define SCI_DEFAULT_ERROR_MASK (SCI_PER | SCI_FER)
42
43/* SCxSR (Serial Status Register) on SCIF, HSCIF */
44#define SCIF_ER 0x0080 /* Receive Error */
45#define SCIF_TEND 0x0040 /* Transmission End */
46#define SCIF_TDFE 0x0020 /* Transmit FIFO Data Empty */
47#define SCIF_BRK 0x0010 /* Break Detect */
48#define SCIF_FER 0x0008 /* Framing Error */
49#define SCIF_PER 0x0004 /* Parity Error */
50#define SCIF_RDF 0x0002 /* Receive FIFO Data Full */
51#define SCIF_DR 0x0001 /* Receive Data Ready */
52
53#define SCIF_DEFAULT_ERROR_MASK (SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK)
54
55/* SCFCR (FIFO Control Register) */
56#define SCFCR_LOOP (1 << 0) /* Loopback Test */
57
58/* SCSPTR (Serial Port Register), optional */
59#define SCSPTR_RTSIO (1 << 7) /* Serial Port RTS Pin Input/Output */
60#define SCSPTR_CTSIO (1 << 5) /* Serial Port CTS Pin Input/Output */
61#define SCSPTR_SPB2IO (1 << 1) /* Serial Port Break Input/Output */
62#define SCSPTR_SPB2DT (1 << 0) /* Serial Port Break Data */
63
64/* HSSRR HSCIF */
65#define HSCIF_SRE 0x8000 /* Sampling Rate Register Enable */
66 24
67enum { 25enum {
68 SCIx_PROBE_REGTYPE, 26 SCIx_PROBE_REGTYPE,
@@ -82,28 +40,6 @@ enum {
82 SCIx_NR_REGTYPES, 40 SCIx_NR_REGTYPES,
83}; 41};
84 42
85/*
86 * SCI register subset common for all port types.
87 * Not all registers will exist on all parts.
88 */
89enum {
90 SCSMR, /* Serial Mode Register */
91 SCBRR, /* Bit Rate Register */
92 SCSCR, /* Serial Control Register */
93 SCxSR, /* Serial Status Register */
94 SCFCR, /* FIFO Control Register */
95 SCFDR, /* FIFO Data Count Register */
96 SCxTDR, /* Transmit (FIFO) Data Register */
97 SCxRDR, /* Receive (FIFO) Data Register */
98 SCLSR, /* Line Status Register */
99 SCTFDR, /* Transmit FIFO Data Count Register */
100 SCRFDR, /* Receive FIFO Data Count Register */
101 SCSPTR, /* Serial Port Register */
102 HSSRR, /* Sampling Rate Register */
103
104 SCIx_NR_REGS,
105};
106
107struct device; 43struct device;
108 44
109struct plat_sci_port_ops { 45struct plat_sci_port_ops {
@@ -113,7 +49,7 @@ struct plat_sci_port_ops {
113/* 49/*
114 * Port-specific capabilities 50 * Port-specific capabilities
115 */ 51 */
116#define SCIx_HAVE_RTSCTS (1 << 0) 52#define SCIx_HAVE_RTSCTS BIT(0)
117 53
118/* 54/*
119 * Platform device specific platform_data struct 55 * Platform device specific platform_data struct
diff --git a/include/linux/tty.h b/include/linux/tty.h
index d76631f615c2..ad6c8913aa3e 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -422,7 +422,7 @@ static inline struct tty_struct *tty_kref_get(struct tty_struct *tty)
422 422
423extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, 423extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode,
424 const char *routine); 424 const char *routine);
425extern char *tty_name(struct tty_struct *tty, char *buf); 425extern const char *tty_name(const struct tty_struct *tty);
426extern void tty_wait_until_sent(struct tty_struct *tty, long timeout); 426extern void tty_wait_until_sent(struct tty_struct *tty, long timeout);
427extern int tty_check_change(struct tty_struct *tty); 427extern int tty_check_change(struct tty_struct *tty);
428extern void __stop_tty(struct tty_struct *tty); 428extern void __stop_tty(struct tty_struct *tty);
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index baa7c80da6af..c1c23f19d4a2 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -138,6 +138,7 @@ header-y += genetlink.h
138header-y += gen_stats.h 138header-y += gen_stats.h
139header-y += gfs2_ondisk.h 139header-y += gfs2_ondisk.h
140header-y += gigaset_dev.h 140header-y += gigaset_dev.h
141header-y += gsmmux.h
141header-y += hdlcdrv.h 142header-y += hdlcdrv.h
142header-y += hdlc.h 143header-y += hdlc.h
143header-y += hdreg.h 144header-y += hdreg.h
diff --git a/include/linux/gsmmux.h b/include/uapi/linux/gsmmux.h
index c25e9477f7c3..c06742d52856 100644
--- a/include/linux/gsmmux.h
+++ b/include/uapi/linux/gsmmux.h
@@ -1,6 +1,9 @@
1#ifndef _LINUX_GSMMUX_H 1#ifndef _LINUX_GSMMUX_H
2#define _LINUX_GSMMUX_H 2#define _LINUX_GSMMUX_H
3 3
4#include <linux/if.h>
5#include <linux/ioctl.h>
6
4struct gsm_config 7struct gsm_config
5{ 8{
6 unsigned int adaption; 9 unsigned int adaption;
diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h
index b2122813f18a..93ba148f923e 100644
--- a/include/uapi/linux/serial_core.h
+++ b/include/uapi/linux/serial_core.h
@@ -258,4 +258,7 @@
258/* Cris v10 / v32 SoC */ 258/* Cris v10 / v32 SoC */
259#define PORT_CRIS 112 259#define PORT_CRIS 112
260 260
261/* STM32 USART */
262#define PORT_STM32 113
263
261#endif /* _UAPILINUX_SERIAL_CORE_H */ 264#endif /* _UAPILINUX_SERIAL_CORE_H */
diff --git a/include/uapi/linux/tty_flags.h b/include/uapi/linux/tty_flags.h
index fae4864737fa..072e41e45ee2 100644
--- a/include/uapi/linux/tty_flags.h
+++ b/include/uapi/linux/tty_flags.h
@@ -15,7 +15,7 @@
15#define ASYNCB_FOURPORT 1 /* Set OU1, OUT2 per AST Fourport settings */ 15#define ASYNCB_FOURPORT 1 /* Set OU1, OUT2 per AST Fourport settings */
16#define ASYNCB_SAK 2 /* Secure Attention Key (Orange book) */ 16#define ASYNCB_SAK 2 /* Secure Attention Key (Orange book) */
17#define ASYNCB_SPLIT_TERMIOS 3 /* [x] Separate termios for dialin/callout */ 17#define ASYNCB_SPLIT_TERMIOS 3 /* [x] Separate termios for dialin/callout */
18#define ASYNCB_SPD_HI 4 /* Use 56000 instead of 38400 bps */ 18#define ASYNCB_SPD_HI 4 /* Use 57600 instead of 38400 bps */
19#define ASYNCB_SPD_VHI 5 /* Use 115200 instead of 38400 bps */ 19#define ASYNCB_SPD_VHI 5 /* Use 115200 instead of 38400 bps */
20#define ASYNCB_SKIP_TEST 6 /* Skip UART test during autoconfiguration */ 20#define ASYNCB_SKIP_TEST 6 /* Skip UART test during autoconfiguration */
21#define ASYNCB_AUTO_IRQ 7 /* Do automatic IRQ during 21#define ASYNCB_AUTO_IRQ 7 /* Do automatic IRQ during