From de71e9bdbb8c2d9d1cf91c32e03a5609745ac7b5 Mon Sep 17 00:00:00 2001 From: Kyungwoo Kang Date: Wed, 25 Apr 2018 17:51:28 +0900 Subject: [PATCH] [COMMON] serial: samsung: Add interrupt masking before enable the channel & remove duplicaed function call. 1. If the UART channel is located in non-alive block, SFR values go to the reset value after the system power mode. So the interrupt should be masked before enabling the channel otherwise Tx interrupt will be occurred without any purpose. 2. UART channel reset is called twice when resume sequence, so we decided to remove one of reset function call. Change-Id: Ie84c51b0c97c572d48d302b43ec3ee64ee5ea597 Signed-off-by: Kyungwoo Kang --- drivers/tty/serial/samsung.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index ead6a9acf9d6..82068129776f 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1377,6 +1377,9 @@ static void s3c24xx_serial_resetport(struct uart_port *port, ucon |= S3C2443_UCON_LOOPBACK; } + /* To prevent unexpected Interrupt before enabling the channel */ + wr_regl(port, S3C64XX_UINTM, 0xf); + /* reset both fifos */ wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH); wr_regl(port, S3C2410_UFCON, cfg->ufcon); @@ -1871,10 +1874,6 @@ static int s3c24xx_serial_resume(struct device *dev) struct s3c24xx_uart_port *ourport = to_ourport(port); if (port) { - uart_clock_enable(ourport); - exynos_usi_init(port); - s3c24xx_serial_resetport(port, s3c24xx_port_to_cfg(port)); - uart_clock_disable(ourport); uart_resume_port(&s3c24xx_uart_drv, port); -- 2.20.1