aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/8250_early.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-03-09 16:27:12 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-26 16:16:20 +0100
commitc7cef0a84912cab3c9df8949b034e4aa62982ec9 (patch)
tree5e3d7761af96a243ac7460cbbd4e6b20f4eb00c2 /drivers/tty/serial/8250/8250_early.c
parente13cb72beeada6f6ac12058b9129334e3bb5ce85 (diff)
downloadlinux-c7cef0a84912cab3c9df8949b034e4aa62982ec9.tar.gz
console: Add extensible console matching
Add match() method to struct console which allows the console to perform console command line matching instead of (or in addition to) default console matching (ie., by fixed name and index). The match() method returns 0 to indicate a successful match; normal console matching occurs if no match() method is defined or the match() method returns non-zero. The match() method is expected to set the console index if required. Re-implement earlycon-to-console-handoff with direct matching of "console=uart|uart8250,..." to the 8250 ttyS console. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250_early.c')
-rw-r--r--drivers/tty/serial/8250/8250_early.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index c31a22b4f845..49bca65057e6 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -173,26 +173,3 @@ int __init setup_early_serial8250_console(char *cmdline)
return setup_earlycon(cmdline, match, early_serial8250_setup);
}
-
-int serial8250_find_port_for_earlycon(void)
-{
- struct earlycon_device *device = early_device;
- struct uart_port *port = device ? &device->port : NULL;
- int line;
- int ret;
-
- if (!port || (!port->membase && !port->iobase))
- return -ENODEV;
-
- line = serial8250_find_port(port);
- if (line < 0)
- return -ENODEV;
-
- ret = update_console_cmdline("uart", 8250,
- "ttyS", line, device->options);
- if (ret < 0)
- ret = update_console_cmdline("uart", 0,
- "ttyS", line, device->options);
-
- return ret;
-}