From nobody Tue Feb 10 06:25:13 2026 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADF42320CA8; Mon, 27 Oct 2025 15:47:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761580041; cv=none; b=EwYtp/vCjOXCTpvmDHHr/Ey+t2jbFyGR0Anzx4dYE9IeuhnaWjMsF/jJyB7DMxr253NQ/UsAenT+ZoByit2udDX8w/vMxHG8LG67Rn9I9UQyHATi56DV1XUehnI5HtDWVBLY0YV6BzZ8byI+D8EIQGNVIW5ihUyBW6rQMXf4t9U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761580041; c=relaxed/simple; bh=ntX71XVcorWnBmEc2m41XECfwxkJgnovnaAh7jfI4Uw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pKeDkikBS2vwzFwGA5DUErmCkI0CQ0Ik6iA1Je17hCv53c46/Bx6LM/c3o9Y42UmY4n16QvfhnXvUR215an8EQEJs+NsAkNym6kymoyNr09y/ktL7ydNLi79Jtdcx7G47D8IbEQWgUfZXH96xkShEZC1J6RA0eoTYdYyYOZqBhs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-CSE-ConnectionGUID: uqmPXIGeTj2uPbCd2Lp4uA== X-CSE-MsgGUID: W+5/ZspPTTmgc0L3joDs1w== Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 28 Oct 2025 00:47:18 +0900 Received: from localhost.localdomain (unknown [10.226.93.103]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 59686400A67C; Tue, 28 Oct 2025 00:47:15 +0900 (JST) From: Biju Das To: Greg Kroah-Hartman , Jiri Slaby Cc: Biju Das , Geert Uytterhoeven , Lad Prabhakar , Wolfram Sang , Claudiu Beznea , Nam Cao , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH 14/19] serial: sh-sci: Add finish_console_write() callback Date: Mon, 27 Oct 2025 15:46:01 +0000 Message-ID: <20251027154615.115759-15-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251027154615.115759-1-biju.das.jz@bp.renesas.com> References: <20251027154615.115759-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add finish_console_write() callback as RZ/G3E RSCI IP needs special handling compared to other SoCs. Signed-off-by: Biju Das --- drivers/tty/serial/sh-sci-common.h | 1 + drivers/tty/serial/sh-sci.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/sh-sci-common.h b/drivers/tty/serial/sh-sci= -common.h index a3f4a76cdecb..2e97aad390d9 100644 --- a/drivers/tty/serial/sh-sci-common.h +++ b/drivers/tty/serial/sh-sci-common.h @@ -95,6 +95,7 @@ struct sci_port_ops { void (*shutdown_complete)(struct uart_port *port); =20 void (*prepare_console_write)(struct uart_port *port, u32 ctrl); + void (*finish_console_write)(struct uart_port *port, u32 ctrl); void (*console_save)(struct uart_port *port); void (*console_restore)(struct uart_port *port); size_t (*suspend_regs_size)(void); diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index e478286229f6..7d1c8338f36c 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -3265,7 +3265,10 @@ static void serial_console_write(struct console *co,= const char *s, cpu_relax(); =20 /* restore the SCSCR */ - sci_port->ops->write_reg(port, regs->control, ctrl); + if (sci_port->ops->finish_console_write) + sci_port->ops->finish_console_write(port, ctrl); + else + sci_port->ops->write_reg(port, regs->control, ctrl); =20 if (locked) uart_port_unlock_irqrestore(port, flags); --=20 2.43.0