Skip to content

Commit aea9a80

Browse files
sudeep-hollagregkh
authored andcommitted
tty: serial: pl011: add ttyAMA for matching pl011 console
Commit c7cef0a ("console: Add extensible console matching") added 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). Commit ad1696f ("ACPI: parse SPCR and enable matching console") introduced support for SPCR as matching console. Commit 10879ae ("serial: pl011: add console matching function") added the match method for pl011 console which checks for the console string to be "pl011" Now on a platform which has both SPCR in the ACPI tables and ttyAMA in the command line, the ttyAMA is chosen as "selected console" but it doesn't pass the matching console method which results in CON_CONSDEV not being set on the "selected console". As a result of that, the bootconsole(SPCR in the above case) is not unregistered and all the beginning boot messages are seen twice. This patch adds "ttyAMA" so that it's considered to match pl011 console. Fixes: 10879ae ("serial: pl011: add console matching function") Cc: Russell King <linux@armlinux.org.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.com> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Aleksey Makarov <aleksey.makarov@linaro.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a8a1781 commit aea9a80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/amba-pl011.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2340,7 +2340,7 @@ static int __init pl011_console_match(struct console *co, char *name, int idx,
23402340
resource_size_t addr;
23412341
int i;
23422342

2343-
if (strcmp(name, "pl011") != 0)
2343+
if (strcmp(name, "pl011") != 0 || strcmp(name, "ttyAMA") != 0)
23442344
return -ENODEV;
23452345

23462346
if (uart_parse_earlycon(options, &iotype, &addr, &options))

0 commit comments

Comments
 (0)