From: Daniel Palmer <daniel@0x0f.com>
To: devicetree@vger.kernel.org, linux-serial@vger.kernel.org,
robh+dt@kernel.org, andriy.shevchenko@linux.intel.com,
jirislaby@kernel.org
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, romain.perier@gmail.com,
Daniel Palmer <daniel@0x0f.com>
Subject: [PATCH 2/4] serial: 8250_dw: Add MStar MSC313 quirk
Date: Thu, 24 Mar 2022 21:44:00 +0900 [thread overview]
Message-ID: <20220324124402.3631379-3-daniel@0x0f.com> (raw)
In-Reply-To: <20220324124402.3631379-1-daniel@0x0f.com>
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@0x0f.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
next prev parent reply other threads:[~2022-03-24 12:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-24 12:43 [PATCH 0/4] Add support for MStar MSC313 uarts Daniel Palmer
2022-03-24 12:43 ` [PATCH 1/4] dt-bindings: serial: snps-dw-apb-uart: Add " Daniel Palmer
2022-04-01 0:20 ` Rob Herring
2022-03-24 12:44 ` Daniel Palmer [this message]
2022-03-24 13:58 ` [PATCH 2/4] serial: 8250_dw: Add MStar MSC313 quirk Andy Shevchenko
2022-03-24 12:44 ` [PATCH 3/4] ARM: dts: mstar: Switch pm_uart to mstar,msc313-uart Daniel Palmer
2022-03-25 12:23 ` Romain Perier
2022-03-24 12:44 ` [PATCH 4/4] ARM: dts: mstar: Add second UART to base dtsi Daniel Palmer
2022-03-25 12:25 ` Romain Perier
2022-03-28 13:28 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220324124402.3631379-3-daniel@0x0f.com \
--to=daniel@0x0f.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=jirislaby@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=romain.perier@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).