Skip to content

Commit 7186324

Browse files
committed
Revert "serial: sh-sci: Clean sci_ports[0] after at earlycon exit"
This reverts commit 3791ea6. It was reported to cause boot-time issues, so revert it for now. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Fixes: 3791ea6 ("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>
1 parent b5a23a6 commit 7186324

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

drivers/tty/serial/sh-sci.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3535,32 +3535,6 @@ sh_early_platform_init_buffer("earlyprintk", &sci_driver,
35353535
#ifdef CONFIG_SERIAL_SH_SCI_EARLYCON
35363536
static struct plat_sci_port port_cfg __initdata;
35373537

3538-
static int early_console_exit(struct console *co)
3539-
{
3540-
struct sci_port *sci_port = &sci_ports[0];
3541-
struct uart_port *port = &sci_port->port;
3542-
unsigned long flags;
3543-
int locked = 1;
3544-
3545-
if (port->sysrq)
3546-
locked = 0;
3547-
else if (oops_in_progress)
3548-
locked = uart_port_trylock_irqsave(port, &flags);
3549-
else
3550-
uart_port_lock_irqsave(port, &flags);
3551-
3552-
/*
3553-
* Clean the slot used by earlycon. A new SCI device might
3554-
* map to this slot.
3555-
*/
3556-
memset(sci_ports, 0, sizeof(*sci_port));
3557-
3558-
if (locked)
3559-
uart_port_unlock_irqrestore(port, flags);
3560-
3561-
return 0;
3562-
}
3563-
35643538
static int __init early_console_setup(struct earlycon_device *device,
35653539
int type)
35663540
{
@@ -3577,8 +3551,6 @@ static int __init early_console_setup(struct earlycon_device *device,
35773551
SCSCR_RE | SCSCR_TE | port_cfg.scscr);
35783552

35793553
device->con->write = serial_console_write;
3580-
device->con->exit = early_console_exit;
3581-
35823554
return 0;
35833555
}
35843556
static int __init sci_early_console_setup(struct earlycon_device *device,

0 commit comments

Comments
 (0)