diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/serial_core.h | 16 | ||||
| -rw-r--r-- | include/linux/tty_ldisc.h | 5 | ||||
| -rw-r--r-- | include/uapi/linux/serial_core.h | 8 | ||||
| -rw-r--r-- | include/uapi/linux/serial_reg.h | 2 |
4 files changed, 28 insertions, 3 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index f729be981da0..7a15b5b24c0b 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -285,6 +285,22 @@ static inline int uart_poll_timeout(struct uart_port *port) | |||
| 285 | /* | 285 | /* |
| 286 | * Console helpers. | 286 | * Console helpers. |
| 287 | */ | 287 | */ |
| 288 | struct earlycon_device { | ||
| 289 | struct console *con; | ||
| 290 | struct uart_port port; | ||
| 291 | char options[16]; /* e.g., 115200n8 */ | ||
| 292 | unsigned int baud; | ||
| 293 | }; | ||
| 294 | int setup_earlycon(char *buf, const char *match, | ||
| 295 | int (*setup)(struct earlycon_device *, const char *)); | ||
| 296 | |||
| 297 | #define EARLYCON_DECLARE(name, func) \ | ||
| 298 | static int __init name ## _setup_earlycon(char *buf) \ | ||
| 299 | { \ | ||
| 300 | return setup_earlycon(buf, __stringify(name), func); \ | ||
| 301 | } \ | ||
| 302 | early_param("earlycon", name ## _setup_earlycon); | ||
| 303 | |||
| 288 | struct uart_port *uart_get_console(struct uart_port *ports, int nr, | 304 | struct uart_port *uart_get_console(struct uart_port *ports, int nr, |
| 289 | struct console *c); | 305 | struct console *c); |
| 290 | void uart_parse_options(char *options, int *baud, int *parity, int *bits, | 306 | void uart_parse_options(char *options, int *baud, int *parity, int *bits, |
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index add26da2faeb..00c9d688d7b7 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h | |||
| @@ -92,7 +92,10 @@ | |||
| 92 | * This function is called by the low-level tty driver to signal | 92 | * This function is called by the low-level tty driver to signal |
| 93 | * that line discpline should try to send more characters to the | 93 | * that line discpline should try to send more characters to the |
| 94 | * low-level driver for transmission. If the line discpline does | 94 | * low-level driver for transmission. If the line discpline does |
| 95 | * not have any more data to send, it can just return. | 95 | * not have any more data to send, it can just return. If the line |
| 96 | * discipline does have some data to send, please arise a tasklet | ||
| 97 | * or workqueue to do the real data transfer. Do not send data in | ||
| 98 | * this hook, it may leads to a deadlock. | ||
| 96 | * | 99 | * |
| 97 | * int (*hangup)(struct tty_struct *) | 100 | * int (*hangup)(struct tty_struct *) |
| 98 | * | 101 | * |
diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h index b47dba2c1e6f..5820269aa132 100644 --- a/include/uapi/linux/serial_core.h +++ b/include/uapi/linux/serial_core.h | |||
| @@ -211,7 +211,7 @@ | |||
| 211 | /* VIA VT8500 SoC */ | 211 | /* VIA VT8500 SoC */ |
| 212 | #define PORT_VT8500 97 | 212 | #define PORT_VT8500 97 |
| 213 | 213 | ||
| 214 | /* Xilinx PSS UART */ | 214 | /* Cadence (Xilinx Zynq) UART */ |
| 215 | #define PORT_XUARTPS 98 | 215 | #define PORT_XUARTPS 98 |
| 216 | 216 | ||
| 217 | /* Atheros AR933X SoC */ | 217 | /* Atheros AR933X SoC */ |
| @@ -238,4 +238,10 @@ | |||
| 238 | /* Tilera TILE-Gx UART */ | 238 | /* Tilera TILE-Gx UART */ |
| 239 | #define PORT_TILEGX 106 | 239 | #define PORT_TILEGX 106 |
| 240 | 240 | ||
| 241 | /* MEN 16z135 UART */ | ||
| 242 | #define PORT_MEN_Z135 107 | ||
| 243 | |||
| 244 | /* SC16IS74xx */ | ||
| 245 | #define PORT_SC16IS7XX 108 | ||
| 246 | |||
| 241 | #endif /* _UAPILINUX_SERIAL_CORE_H */ | 247 | #endif /* _UAPILINUX_SERIAL_CORE_H */ |
diff --git a/include/uapi/linux/serial_reg.h b/include/uapi/linux/serial_reg.h index e6322605b138..99b47058816a 100644 --- a/include/uapi/linux/serial_reg.h +++ b/include/uapi/linux/serial_reg.h | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | #define UART_IIR 2 /* In: Interrupt ID Register */ | 33 | #define UART_IIR 2 /* In: Interrupt ID Register */ |
| 34 | #define UART_IIR_NO_INT 0x01 /* No interrupts pending */ | 34 | #define UART_IIR_NO_INT 0x01 /* No interrupts pending */ |
| 35 | #define UART_IIR_ID 0x06 /* Mask for the interrupt ID */ | 35 | #define UART_IIR_ID 0x0e /* Mask for the interrupt ID */ |
| 36 | #define UART_IIR_MSI 0x00 /* Modem status interrupt */ | 36 | #define UART_IIR_MSI 0x00 /* Modem status interrupt */ |
| 37 | #define UART_IIR_THRI 0x02 /* Transmitter holding register empty */ | 37 | #define UART_IIR_THRI 0x02 /* Transmitter holding register empty */ |
| 38 | #define UART_IIR_RDI 0x04 /* Receiver data interrupt */ | 38 | #define UART_IIR_RDI 0x04 /* Receiver data interrupt */ |
