diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2015-03-09 21:27:21 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-26 17:25:27 +0100 |
commit | 470ca0de69feaba5df215ad804cec1859883a5ed (patch) | |
tree | f6881a136d161bb131d56b9b68860568756b53eb /drivers/tty/serial/8250/8250_early.c | |
parent | serial: earlycon: Refactor earlycon registration (diff) | |
download | linux-470ca0de69feaba5df215ad804cec1859883a5ed.tar.xz linux-470ca0de69feaba5df215ad804cec1859883a5ed.zip |
serial: earlycon: Enable earlycon without command line param
Earlycon matching can only be triggered if 'earlycon=...' has been
specified on the kernel command line. To workaround this limitation
requires tight coupling between arches and specific serial drivers
in order to start an earlycon. Devicetree avoids this limitation
with a link table that contains the required data to match earlycons.
Mirror this approach for earlycon match by name. Re-purpose
EARLYCON_DECLARE to generate a table entry which associates name with
setup() function. Re-purpose setup_earlycon() to scan this table for
an earlycon match, which is registered if found.
Declare one "earlycon" early_param, which calls setup_earlycon().
This design allows setup_earlycon() to be called directly with a
param string (as if 'earlycon=...' had been set on the command line).
Re-registration (either directly or by early_param) is prevented.
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.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c index b199c10689f4..d272139a5729 100644 --- a/drivers/tty/serial/8250/8250_early.c +++ b/drivers/tty/serial/8250/8250_early.c @@ -170,10 +170,5 @@ EARLYCON_DECLARE(uart, early_serial8250_setup); int __init setup_early_serial8250_console(char *cmdline) { - char match[] = "uart8250"; - - if (cmdline && cmdline[4] == ',') - match[4] = '\0'; - - return setup_earlycon(cmdline, match, early_serial8250_setup); + return setup_earlycon(cmdline); } |