OSDN Git Service

tty: serial: meson: add independent uart_data for A1 SoC family
authorDmitry Rokosov <ddrokosov@sberdevices.ru>
Wed, 5 Jul 2023 18:18:31 +0000 (21:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Jul 2023 18:22:08 +0000 (20:22 +0200)
Implement separate uart_data to ensure proper devname value for the A1
SoC family. Use 'ttyS' devname, as required by the A1 architecture,
instead of the legacy gx architecture.

Signed-off-by: Dmitry Rokosov <ddrokosov@sberdevices.ru>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230705181833.16137-6-ddrokosov@sberdevices.ru
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/meson_uart.c

index 6a63184..84cf10b 100644 (file)
@@ -818,6 +818,11 @@ static struct meson_uart_data meson_g12a_uart_data = {
        .has_xtal_div2 = true,
 };
 
+static struct meson_uart_data meson_a1_uart_data = {
+       .uart_driver = &MESON_UART_DRIVER(ttyS),
+       .has_xtal_div2 = false,
+};
+
 static struct meson_uart_data meson_s4_uart_data = {
        .uart_driver = &MESON_UART_DRIVER(ttyS),
        .has_xtal_div2 = true,
@@ -836,6 +841,10 @@ static const struct of_device_id meson_uart_dt_match[] = {
                .compatible = "amlogic,meson-s4-uart",
                .data = (void *)&meson_s4_uart_data,
        },
+       {
+               .compatible = "amlogic,meson-a1-uart",
+               .data = (void *)&meson_a1_uart_data,
+       },
        { /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, meson_uart_dt_match);