[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220324124402.3631379-3-daniel@0x0f.com>
Date: Thu, 24 Mar 2022 21:44:00 +0900
From: Daniel Palmer <daniel@...f.com>
To: devicetree@...r.kernel.org, linux-serial@...r.kernel.org,
robh+dt@...nel.org, andriy.shevchenko@...ux.intel.com,
jirislaby@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
romain.perier@...il.com, Daniel Palmer <daniel@...f.com>
Subject: [PATCH 2/4] serial: 8250_dw: Add MStar MSC313 quirk
The version of the IP used on the MStar MSC313 and later
MStar and SigmaStar SoCs has the USR register at a different
location. Add a quirk for this.
Signed-off-by: Daniel Palmer <daniel@...f.com>
---
drivers/tty/serial/8250/8250_dw.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 1769808031c5..01737e5706a5 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -416,6 +416,10 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
p->serial_out = dw8250_serial_out38x;
if (of_device_is_compatible(np, "starfive,jh7100-uart"))
p->set_termios = dw8250_do_set_termios;
+ if (of_device_is_compatible(np, "mstar,msc313-uart")) {
+ data->usr_reg = 0x7;
+ data->skip_autocfg = true;
+ }
} else if (acpi_dev_present("APMC0D08", NULL, -1)) {
p->iotype = UPIO_MEM32;
@@ -699,6 +703,7 @@ static const struct of_device_id dw8250_of_match[] = {
{ .compatible = "marvell,armada-38x-uart" },
{ .compatible = "renesas,rzn1-uart" },
{ .compatible = "starfive,jh7100-uart" },
+ { .compatible = "mstar,msc313-uart" },
{ /* Sentinel */ }
};
MODULE_DEVICE_TABLE(of, dw8250_of_match);
--
2.35.1
Powered by blists - more mailing lists