[PATCH v3 2/5] tty: serial: sh-sci: Fix Rx on RZ/G2L SCI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



SCI IP on RZ/G2L alike SoCs do not need regshift compared to other SCI
IPs on the SH platform. Currently, it does regshift and configuring Rx
wrongly. Drop adding regshift for RZ/G2L alike SoCs.

Fixes: f9a2adcc9e90 ("arm64: dts: renesas: r9a07g044: Add SCI[0-1] nodes")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
---
v3:
 * New patch.
---
 drivers/tty/serial/sh-sci.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 616041faab55..b9cd27451f90 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -158,6 +158,7 @@ struct sci_port {
 
 	bool has_rtscts;
 	bool autorts;
+	bool is_rz_sci;
 };
 
 #define SCI_NPORTS CONFIG_SERIAL_SH_SCI_NR_UARTS
@@ -2937,7 +2938,7 @@ static int sci_init_single(struct platform_device *dev,
 	port->flags		= UPF_FIXED_PORT | UPF_BOOT_AUTOCONF | p->flags;
 	port->fifosize		= sci_port->params->fifosize;
 
-	if (port->type == PORT_SCI) {
+	if (port->type == PORT_SCI && !sci_port->is_rz_sci) {
 		if (sci_port->reg_size >= 0x20)
 			port->regshift = 2;
 		else
@@ -3353,6 +3354,11 @@ static int sci_probe(struct platform_device *dev)
 	sp = &sci_ports[dev_id];
 	platform_set_drvdata(dev, sp);
 
+	if (of_device_is_compatible(dev->dev.of_node, "renesas,r9a07g043-sci") ||
+	    of_device_is_compatible(dev->dev.of_node, "renesas,r9a07g044-sci") ||
+	    of_device_is_compatible(dev->dev.of_node, "renesas,r9a07g054-sci"))
+		sp->is_rz_sci = 1;
+
 	ret = sci_probe_single(dev, dev_id, p, sp);
 	if (ret)
 		return ret;
-- 
2.25.1




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux