summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/meson_uart.c
diff options
context:
space:
mode:
authorYu Tu <yu.tu@amlogic.com>2022-04-22 14:13:20 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-22 17:20:48 +0300
commit9b92cc5ee2d10e6c4d327d1e4ceb77aa8b1081ee (patch)
tree9c9932295ee22e0a77887643520a15578eb72b1e /drivers/tty/serial/meson_uart.c
parent00a7fa836dbc454faf5b7027ad67519af7c6c15b (diff)
downloadlinux-9b92cc5ee2d10e6c4d327d1e4ceb77aa8b1081ee.tar.xz
tty: serial: meson: Added S4 SOC compatibility
Make UART driver compatible with S4 SOC UART. Meanwhile, the S4 SOC UART uses 12MHz as the clock source for baud rate calculations. Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Yu Tu <yu.tu@amlogic.com> Link: https://lore.kernel.org/r/20220422111320.19234-3-yu.tu@amlogic.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/meson_uart.c')
-rw-r--r--drivers/tty/serial/meson_uart.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index 58bd2723c004..c748e5dd5348 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -790,11 +790,19 @@ static int meson_uart_remove(struct platform_device *pdev)
return 0;
}
+static struct meson_uart_data s4_uart_data = {
+ .has_xtal_div2 = true,
+};
+
static const struct of_device_id meson_uart_dt_match[] = {
{ .compatible = "amlogic,meson6-uart" },
{ .compatible = "amlogic,meson8-uart" },
{ .compatible = "amlogic,meson8b-uart" },
{ .compatible = "amlogic,meson-gx-uart" },
+ {
+ .compatible = "amlogic,meson-s4-uart",
+ .data = (void *)&s4_uart_data,
+ },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, meson_uart_dt_match);