earlycon: Use common framework for earlycon declarations
authorPeter Hurley <peter@hurleysoftware.com>
Sat, 16 Jan 2016 23:23:39 +0000 (15:23 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 06:07:37 +0000 (22:07 -0800)
commit2eaa790989e03900298ad24f77f1086dbbc1aebd
treeda1fa5d85a729b16c1aecaac96608d0dd1016981
parent8477614d9f7c5ce0e871e1aa200d9060a6b8749e
earlycon: Use common framework for earlycon declarations

Use a single common table of struct earlycon_id for both command line
and devicetree. Re-define OF_EARLYCON_DECLARE() macro to instance a
unique earlycon declaration (the declaration is only guaranteed to be
unique within a compilation unit; separate compilation units must still
use unique earlycon names).

The semantics of OF_EARLYCON_DECLARE() is different; it declares an
earlycon which can matched either on the command line or by devicetree.
EARLYCON_DECLARE() is semantically unchanged; it declares an earlycon
which is matched by command line only. Remove redundant instances of
EARLYCON_DECLARE().

This enables all earlycons to properly initialize struct console
with the appropriate name and index, which improves diagnostics and
enables direct earlycon-to-console handoff.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/of/fdt.c
drivers/tty/serial/amba-pl011.c
drivers/tty/serial/arc_uart.c
drivers/tty/serial/earlycon.c
drivers/tty/serial/msm_serial.c
drivers/tty/serial/samsung.c
drivers/tty/serial/sprd_serial.c
include/asm-generic/vmlinux.lds.h
include/linux/serial_core.h