aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/serial_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r--include/linux/serial_core.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index f729be981da0..5bbb809ee197 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -285,6 +285,28 @@ static inline int uart_poll_timeout(struct uart_port *port)
285/* 285/*
286 * Console helpers. 286 * Console helpers.
287 */ 287 */
288struct earlycon_device {
289 struct console *con;
290 struct uart_port port;
291 char options[16]; /* e.g., 115200n8 */
292 unsigned int baud;
293};
294int setup_earlycon(char *buf, const char *match,
295 int (*setup)(struct earlycon_device *, const char *));
296
297extern int of_setup_earlycon(unsigned long addr,
298 int (*setup)(struct earlycon_device *, const char *));
299
300#define EARLYCON_DECLARE(name, func) \
301static int __init name ## _setup_earlycon(char *buf) \
302{ \
303 return setup_earlycon(buf, __stringify(name), func); \
304} \
305early_param("earlycon", name ## _setup_earlycon);
306
307#define OF_EARLYCON_DECLARE(name, compat, fn) \
308 _OF_DECLARE(earlycon, name, compat, fn, void *)
309
288struct uart_port *uart_get_console(struct uart_port *ports, int nr, 310struct uart_port *uart_get_console(struct uart_port *ports, int nr,
289 struct console *c); 311 struct console *c);
290void uart_parse_options(char *options, int *baud, int *parity, int *bits, 312void uart_parse_options(char *options, int *baud, int *parity, int *bits,