summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-30 16:55:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-30 16:55:56 +0100
commit718632467d88e98816fa01ab12681ef1c2aa56f8 (patch)
treeb8334afb0507f97574bafd5694eaf3e70265819c
parentb5a23a60e8ab5711f4952912424347bf3864ce8d (diff)
Revert "serial: sh-sci: Clean sci_ports[0] after at earlycon exit"
This reverts commit 3791ea69a4858b81e0277f695ca40f5aae40f312. It was reported to cause boot-time issues, so revert it for now. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Fixes: 3791ea69a485 ("serial: sh-sci: Clean sci_ports[0] after at earlycon exit") Cc: stable <stable@kernel.org> Cc: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/sh-sci.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 136e0c257af1..df523c744423 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3535,32 +3535,6 @@ sh_early_platform_init_buffer("earlyprintk", &sci_driver,
#ifdef CONFIG_SERIAL_SH_SCI_EARLYCON
static struct plat_sci_port port_cfg __initdata;
-static int early_console_exit(struct console *co)
-{
- struct sci_port *sci_port = &sci_ports[0];
- struct uart_port *port = &sci_port->port;
- unsigned long flags;
- int locked = 1;
-
- if (port->sysrq)
- locked = 0;
- else if (oops_in_progress)
- locked = uart_port_trylock_irqsave(port, &flags);
- else
- uart_port_lock_irqsave(port, &flags);
-
- /*
- * Clean the slot used by earlycon. A new SCI device might
- * map to this slot.
- */
- memset(sci_ports, 0, sizeof(*sci_port));
-
- if (locked)
- uart_port_unlock_irqrestore(port, flags);
-
- return 0;
-}
-
static int __init early_console_setup(struct earlycon_device *device,
int type)
{
@@ -3577,8 +3551,6 @@ static int __init early_console_setup(struct earlycon_device *device,
SCSCR_RE | SCSCR_TE | port_cfg.scscr);
device->con->write = serial_console_write;
- device->con->exit = early_console_exit;
-
return 0;
}
static int __init sci_early_console_setup(struct earlycon_device *device,