aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 19:55:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 19:55:57 -0400
commitcb1595563880a81dab6eab9a5ecb4520d2e76077 (patch)
tree042907fc859287a40a454d57c034015742e38cbf /include/linux
parentc12e69c6aaf785fd307d05cb6f36ca0e7577ead7 (diff)
parent3a13884abea08a5043b98d9374486ec859d1e03a (diff)
Merge tag 'tty-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver update from Greg KH: "Here's the big tty/serial driver update for 3.15-rc1. Nothing major, a number of serial driver updates and a few tty core fixes as well. All have been in linux-next for a while" * tag 'tty-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (71 commits) tty/serial: omap: empty the RX FIFO at the end of half-duplex TX tty/serial: omap: fix RX interrupt enable/disable in half-duplex TX serial: sh-sci: Neaten dev_<level> uses serial: sh-sci: Replace hardcoded 3 by UART_PM_STATE_OFF serial: sh-sci: Add more register documentation serial: sh-sci: Remove useless casts serial: sh-sci: Replace printk() by pr_*() serial_core: Avoid NULL pointer dereference in uart_close() serial_core: Get a reference for port->tty in uart_remove_one_port() serial: clps711x: Give a chance to perform useful tasks during wait loop serial_core: Grammar s/ports/port's/ serial_core: Spelling s/contro/control/ serial: efm32: properly namespace location property serial: max310x: Add missing #include <linux/uaccess.h> synclink: fix info leak in ioctl serial: 8250: Clean up the locking for -rt serial: 8250_pci: change BayTrail default uartclk serial: 8250_pci: more BayTrail error-free bauds serial: sh-sci: Add missing call to uart_remove_one_port() in failure path serial_core: Unregister console in uart_remove_one_port() ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/platform_data/max310x.h64
-rw-r--r--include/linux/platform_data/serial-imx.h2
-rw-r--r--include/linux/serial_bcm63xx.h2
-rw-r--r--include/linux/serial_sci.h93
-rw-r--r--include/linux/tty.h2
-rw-r--r--include/linux/tty_ldisc.h1
6 files changed, 61 insertions, 103 deletions
diff --git a/include/linux/platform_data/max310x.h b/include/linux/platform_data/max310x.h
deleted file mode 100644
index dd11dcd1a184..000000000000
--- a/include/linux/platform_data/max310x.h
+++ /dev/null
@@ -1,64 +0,0 @@
1/*
2 * Maxim (Dallas) MAX3107/8/9, MAX14830 serial driver
3 *
4 * Copyright (C) 2012 Alexander Shiyan <shc_work@mail.ru>
5 *
6 * Based on max3100.c, by Christian Pellegrin <chripell@evolware.org>
7 * Based on max3110.c, by Feng Tang <feng.tang@intel.com>
8 * Based on max3107.c, by Aavamobile
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef _MAX310X_H_
17#define _MAX310X_H_
18
19/*
20 * Example board initialization data:
21 *
22 * static struct max310x_pdata max3107_pdata = {
23 * .driver_flags = MAX310X_EXT_CLK,
24 * .uart_flags[0] = MAX310X_ECHO_SUPRESS | MAX310X_AUTO_DIR_CTRL,
25 * .frequency = 3686400,
26 * .gpio_base = -1,
27 * };
28 *
29 * static struct spi_board_info spi_device_max3107[] = {
30 * {
31 * .modalias = "max3107",
32 * .irq = IRQ_EINT3,
33 * .bus_num = 1,
34 * .chip_select = 1,
35 * .platform_data = &max3107_pdata,
36 * },
37 * };
38 */
39
40#define MAX310X_MAX_UARTS 4
41
42/* MAX310X platform data structure */
43struct max310x_pdata {
44 /* Flags global to driver */
45 const u8 driver_flags;
46#define MAX310X_EXT_CLK (0x00000001) /* External clock enable */
47 /* Flags global to UART port */
48 const u8 uart_flags[MAX310X_MAX_UARTS];
49#define MAX310X_LOOPBACK (0x00000001) /* Loopback mode enable */
50#define MAX310X_ECHO_SUPRESS (0x00000002) /* Enable echo supress */
51#define MAX310X_AUTO_DIR_CTRL (0x00000004) /* Enable Auto direction
52 * control (RS-485)
53 */
54 /* Frequency (extrenal clock or crystal) */
55 const int frequency;
56 /* GPIO base number (can be negative) */
57 const int gpio_base;
58 /* Called during startup */
59 void (*init)(void);
60 /* Called before finish */
61 void (*exit)(void);
62};
63
64#endif
diff --git a/include/linux/platform_data/serial-imx.h b/include/linux/platform_data/serial-imx.h
index 4adec9b154dd..3cc2e3c40914 100644
--- a/include/linux/platform_data/serial-imx.h
+++ b/include/linux/platform_data/serial-imx.h
@@ -23,8 +23,6 @@
23#define IMXUART_IRDA (1<<1) 23#define IMXUART_IRDA (1<<1)
24 24
25struct imxuart_platform_data { 25struct imxuart_platform_data {
26 int (*init)(struct platform_device *pdev);
27 void (*exit)(struct platform_device *pdev);
28 unsigned int flags; 26 unsigned int flags;
29 void (*irda_enable)(int enable); 27 void (*irda_enable)(int enable);
30 unsigned int irda_inv_rx:1; 28 unsigned int irda_inv_rx:1;
diff --git a/include/linux/serial_bcm63xx.h b/include/linux/serial_bcm63xx.h
index 570e964dc899..a80aa1a5bee2 100644
--- a/include/linux/serial_bcm63xx.h
+++ b/include/linux/serial_bcm63xx.h
@@ -116,4 +116,6 @@
116 UART_FIFO_PARERR_MASK | \ 116 UART_FIFO_PARERR_MASK | \
117 UART_FIFO_BRKDET_MASK) 117 UART_FIFO_BRKDET_MASK)
118 118
119#define UART_REG_SIZE 24
120
119#endif /* _LINUX_SERIAL_BCM63XX_H */ 121#endif /* _LINUX_SERIAL_BCM63XX_H */
diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h
index 22b3640c9424..6c5e3bb282b0 100644
--- a/include/linux/serial_sci.h
+++ b/include/linux/serial_sci.h
@@ -10,45 +10,59 @@
10 10
11#define SCIx_NOT_SUPPORTED (-1) 11#define SCIx_NOT_SUPPORTED (-1)
12 12
13#define SCSCR_TIE (1 << 7) 13/* SCSMR (Serial Mode Register) */
14#define SCSCR_RIE (1 << 6) 14#define SCSMR_CHR (1 << 6) /* 7-bit Character Length */
15#define SCSCR_TE (1 << 5) 15#define SCSMR_PE (1 << 5) /* Parity Enable */
16#define SCSCR_RE (1 << 4) 16#define SCSMR_ODD (1 << 4) /* Odd Parity */
17#define SCSCR_REIE (1 << 3) /* not supported by all parts */ 17#define SCSMR_STOP (1 << 3) /* Stop Bit Length */
18#define SCSCR_TOIE (1 << 2) /* not supported by all parts */ 18#define SCSMR_CKS 0x0003 /* Clock Select */
19#define SCSCR_CKE1 (1 << 1) 19
20#define SCSCR_CKE0 (1 << 0) 20/* Serial Control Register (@ = not supported by all parts) */
21 21#define SCSCR_TIE (1 << 7) /* Transmit Interrupt Enable */
22/* SCxSR SCI */ 22#define SCSCR_RIE (1 << 6) /* Receive Interrupt Enable */
23#define SCI_TDRE 0x80 23#define SCSCR_TE (1 << 5) /* Transmit Enable */
24#define SCI_RDRF 0x40 24#define SCSCR_RE (1 << 4) /* Receive Enable */
25#define SCI_ORER 0x20 25#define SCSCR_REIE (1 << 3) /* Receive Error Interrupt Enable @ */
26#define SCI_FER 0x10 26#define SCSCR_TOIE (1 << 2) /* Timeout Interrupt Enable @ */
27#define SCI_PER 0x08 27#define SCSCR_CKE1 (1 << 1) /* Clock Enable 1 */
28#define SCI_TEND 0x04 28#define SCSCR_CKE0 (1 << 0) /* Clock Enable 0 */
29/* SCIFA/SCIFB only */
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 */
29 40
30#define SCI_DEFAULT_ERROR_MASK (SCI_PER | SCI_FER) 41#define SCI_DEFAULT_ERROR_MASK (SCI_PER | SCI_FER)
31 42
32/* SCxSR SCIF, HSCIF */ 43/* SCxSR (Serial Status Register) on SCIF, HSCIF */
33#define SCIF_ER 0x0080 44#define SCIF_ER 0x0080 /* Receive Error */
34#define SCIF_TEND 0x0040 45#define SCIF_TEND 0x0040 /* Transmission End */
35#define SCIF_TDFE 0x0020 46#define SCIF_TDFE 0x0020 /* Transmit FIFO Data Empty */
36#define SCIF_BRK 0x0010 47#define SCIF_BRK 0x0010 /* Break Detect */
37#define SCIF_FER 0x0008 48#define SCIF_FER 0x0008 /* Framing Error */
38#define SCIF_PER 0x0004 49#define SCIF_PER 0x0004 /* Parity Error */
39#define SCIF_RDF 0x0002 50#define SCIF_RDF 0x0002 /* Receive FIFO Data Full */
40#define SCIF_DR 0x0001 51#define SCIF_DR 0x0001 /* Receive Data Ready */
41 52
42#define SCIF_DEFAULT_ERROR_MASK (SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK) 53#define SCIF_DEFAULT_ERROR_MASK (SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK)
43 54
44/* SCSPTR, optional */ 55/* SCFCR (FIFO Control Register) */
45#define SCSPTR_RTSIO (1 << 7) 56#define SCFCR_LOOP (1 << 0) /* Loopback Test */
46#define SCSPTR_CTSIO (1 << 5) 57
47#define SCSPTR_SPB2IO (1 << 1) 58/* SCSPTR (Serial Port Register), optional */
48#define SCSPTR_SPB2DT (1 << 0) 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 */
49 63
50/* HSSRR HSCIF */ 64/* HSSRR HSCIF */
51#define HSCIF_SRE 0x8000 65#define HSCIF_SRE 0x8000 /* Sampling Rate Register Enable */
52 66
53enum { 67enum {
54 SCIx_PROBE_REGTYPE, 68 SCIx_PROBE_REGTYPE,
@@ -73,10 +87,19 @@ enum {
73 * Not all registers will exist on all parts. 87 * Not all registers will exist on all parts.
74 */ 88 */
75enum { 89enum {
76 SCSMR, SCBRR, SCSCR, SCxSR, 90 SCSMR, /* Serial Mode Register */
77 SCFCR, SCFDR, SCxTDR, SCxRDR, 91 SCBRR, /* Bit Rate Register */
78 SCLSR, SCTFDR, SCRFDR, SCSPTR, 92 SCSCR, /* Serial Control Register */
79 HSSRR, 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 */
80 103
81 SCIx_NR_REGS, 104 SCIx_NR_REGS,
82}; 105};
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 90b4fdc8a61f..b90b5c221ff0 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -208,7 +208,7 @@ struct tty_port {
208 wait_queue_head_t delta_msr_wait; /* Modem status change */ 208 wait_queue_head_t delta_msr_wait; /* Modem status change */
209 unsigned long flags; /* TTY flags ASY_*/ 209 unsigned long flags; /* TTY flags ASY_*/
210 unsigned char console:1, /* port is a console */ 210 unsigned char console:1, /* port is a console */
211 low_latency:1; /* direct buffer flush */ 211 low_latency:1; /* optional: tune for latency */
212 struct mutex mutex; /* Locking */ 212 struct mutex mutex; /* Locking */
213 struct mutex buf_mutex; /* Buffer alloc lock */ 213 struct mutex buf_mutex; /* Buffer alloc lock */
214 unsigned char *xmit_buf; /* Optional buffer */ 214 unsigned char *xmit_buf; /* Optional buffer */
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index b8347c207cb8..add26da2faeb 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -126,7 +126,6 @@
126 126
127#include <linux/fs.h> 127#include <linux/fs.h>
128#include <linux/wait.h> 128#include <linux/wait.h>
129#include <linux/wait.h>
130 129
131 130
132/* 131/*