summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorBiju Das <biju.das.jz@bp.renesas.com>2025-11-29 16:43:11 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-12-17 15:07:07 +0100
commitbbcd508c84d4884c620f4f4bb7d382539466b9a3 (patch)
tree40c9b5d11ca9aae6f0d8367f82be958483302eea /drivers/tty
parent5632bda5e848c4592eefa4451092beb4ce29ab76 (diff)
serial: sh-sci: Add finish_console_write() callback
Add finish_console_write() callback as RZ/G3E RSCI IP needs special handling compared to other SoCs. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://patch.msgid.link/20251129164325.209213-16-biju.das.jz@bp.renesas.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sh-sci-common.h1
-rw-r--r--drivers/tty/serial/sh-sci.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/tty/serial/sh-sci-common.h b/drivers/tty/serial/sh-sci-common.h
index 976e394ab968..f363a659c46a 100644
--- a/drivers/tty/serial/sh-sci-common.h
+++ b/drivers/tty/serial/sh-sci-common.h
@@ -93,6 +93,7 @@ struct sci_port_ops {
void (*shutdown_complete)(struct uart_port *port);
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 e2ba752f9c16..8f3314b258d6 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3431,7 +3431,10 @@ static void serial_console_write(struct console *co, const char *s,
cpu_relax();
/* 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);
if (locked)
uart_port_unlock_irqrestore(port, flags);