All of lore.kernel.org
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
	Jiri Slaby <jirislaby@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	linux-serial@vger.kernel.org,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	linux-renesas-soc@vger.kernel.org, stable@vger.kernel.org
Subject: [PATCH v4 2/5] tty: serial: sh-sci: Fix Rx on RZ/G2L SCI
Date: Tue, 21 Mar 2023 11:47:50 +0000	[thread overview]
Message-ID: <20230321114753.75038-3-biju.das.jz@bp.renesas.com> (raw)
In-Reply-To: <20230321114753.75038-1-biju.das.jz@bp.renesas.com>

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: dfc80387aefb ("serial: sh-sci: Compute the regshift value for SCI ports")
Cc: stable@vger.kernel.org
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
v3->v4:
 * Updated the fixes tag
 * Replaced sci_port->is_rz_sci with dev->dev.of_node as regshift are only needed
   for sh770x/sh7750/sh7760, which don't use DT yet.
 * Dropped is_rz_sci variable from struct sci_port.
v3:
 * New patch.
---
 drivers/tty/serial/sh-sci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 616041faab55..15954ca3e9dc 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2937,7 +2937,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 && !dev->dev.of_node) {
 		if (sci_port->reg_size >= 0x20)
 			port->regshift = 2;
 		else
-- 
2.25.1


  parent reply	other threads:[~2023-03-21 11:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-21 11:47 [PATCH v4 0/5] Renesas SCI fixes Biju Das
2023-03-21 11:47 ` [PATCH v4 1/5] tty: serial: sh-sci: Fix transmit end interrupt handler Biju Das
2023-03-27  9:12   ` Geert Uytterhoeven
2023-03-21 11:47 ` Biju Das [this message]
2023-03-27  9:15   ` [PATCH v4 2/5] tty: serial: sh-sci: Fix Rx on RZ/G2L SCI Geert Uytterhoeven
2023-03-28 11:32     ` Biju Das
2023-03-29  9:01       ` Greg Kroah-Hartman
2023-03-29  9:06         ` Biju Das
2023-03-29  9:20           ` Greg Kroah-Hartman
2023-03-29  9:31             ` Biju Das
2023-03-21 11:47 ` [PATCH v4 3/5] tty: serial: sh-sci: Fix Tx on SCI IP Biju Das
2023-04-06  6:50   ` Biju Das
2023-03-21 11:47 ` [PATCH v4 4/5] tty: serial: sh-sci: Add support for tx end interrupt handling Biju Das
2023-03-21 11:47 ` [PATCH v4 5/5] arm64: dts: renesas: r9a07g044: Enable sci0 node using dt overlay Biju Das
2023-03-30 10:03   ` Geert Uytterhoeven
2023-03-30 10:06     ` Biju Das

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=20230321114753.75038-3-biju.das.jz@bp.renesas.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=stable@vger.kernel.org \
    --cc=ysato@users.sourceforge.jp \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.