From fba90e6768a9814ee59ad0a62da443b503afe7dd Mon Sep 17 00:00:00 2001 From: Jiamin Ma Date: Mon, 22 Apr 2019 15:29:53 +0800 Subject: [PATCH] earlycon: support aml-uart as the name for earlycon [1/1] PD#SWPL-6969 Problem: For some historical reason, aml-uart is configured as the earlycon name in uboot, which is not recognized by 4.9 kernel Solution: support aml-uart as the name for earlycon Verify: Ampere Change-Id: I01427f2d512c0bf1972dd545dc71570919c5bc07 Signed-off-by: Jiamin Ma --- drivers/amlogic/uart/meson_uart.c | 1 + include/linux/serial_core.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/drivers/amlogic/uart/meson_uart.c b/drivers/amlogic/uart/meson_uart.c index 811e362..0043e16 100644 --- a/drivers/amlogic/uart/meson_uart.c +++ b/drivers/amlogic/uart/meson_uart.c @@ -956,6 +956,7 @@ static int __init meson_early_console_setup(struct earlycon_device *device, return 0; } EARLYCON_DECLARE(aml_uart, meson_early_console_setup); +EARLYCON_DECLARE_COMP(aml-uart, meson_early_console_setup); static struct console meson_serial_console = { .name = AML_UART_DEV_NAME, diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index c7dff69..3890f0b 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -376,6 +376,11 @@ extern const struct earlycon_id *__earlycon_table_end[]; #define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn) +#ifdef CONFIG_AMLOGIC_MODIFY +#define EARLYCON_DECLARE_COMP(_name, fn) \ + _OF_EARLYCON_DECLARE(_name, "", fn, __LINE__ ## __COUNTER__) +#endif + extern int of_setup_earlycon(const struct earlycon_id *match, unsigned long node, const char *options); -- 2.7.4