tty: serial: amba-pl011: Fix removal of the QDF2xxx workarounds

Message ID 20240131213543.958051-1-m.szyprowski@samsung.com
State New
Headers
Series tty: serial: amba-pl011: Fix removal of the QDF2xxx workarounds |

Commit Message

Marek Szyprowski Jan. 31, 2024, 9:35 p.m. UTC
  Commit 196f34af2bf4 ("tty: serial: amba-pl011: Remove QDF2xxx
workarounds") removed some quirks specific to QDF2xxx SoC family.
Unfortunately it removed a bit too much code from the
pl011_console_match() function, what broke console operation on QEMU's
'virt' ARM/ARM64 machines. Restore the "pl011" related string check as it
was originally introduced in the commit 10879ae5f12e ("serial: pl011: add
console matching function").

Fixes: 196f34af2bf4 ("tty: serial: amba-pl011: Remove QDF2xxx workarounds")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/tty/serial/amba-pl011.c | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Thierry Reding Feb. 1, 2024, 11:29 a.m. UTC | #1
On Wed Jan 31, 2024 at 10:35 PM CET, Marek Szyprowski wrote:
> Commit 196f34af2bf4 ("tty: serial: amba-pl011: Remove QDF2xxx
> workarounds") removed some quirks specific to QDF2xxx SoC family.
> Unfortunately it removed a bit too much code from the
> pl011_console_match() function, what broke console operation on QEMU's
> 'virt' ARM/ARM64 machines. Restore the "pl011" related string check as it
> was originally introduced in the commit 10879ae5f12e ("serial: pl011: add
> console matching function").
>
> Fixes: 196f34af2bf4 ("tty: serial: amba-pl011: Remove QDF2xxx workarounds")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/tty/serial/amba-pl011.c | 3 +++
>  1 file changed, 3 insertions(+)

I was about to send out the same patch:

Reviewed-by: Thierry Reding <treding@nvidia.com>
  

Patch

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index c4df9cbc264b..33d559fa10a6 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2451,6 +2451,9 @@  static int pl011_console_match(struct console *co, char *name, int idx,
 	resource_size_t addr;
 	int i;
 
+	if (strcmp(name, "pl011") != 0)
+		return -ENODEV;
+
 	if (uart_parse_earlycon(options, &iotype, &addr, &options))
 		return -ENODEV;