aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/samsung.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2018-09-13 04:21:25 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-18 10:07:24 -0400
commit1ff3652bc7111df26b5807037f624be294cf69d5 (patch)
tree344b23b8e50d8bf6c4e0efcc69809f31ea5c8a36 /drivers/tty/serial/samsung.c
parent3d8b43ad9c0cf023dd12458f23250c1b86b21e4e (diff)
serial: samsung: Enable baud clock for UART reset procedure in resume
Ensure that the baud clock is also enabled for UART register writes in driver resume. On Exynos5433 SoC this is needed to avoid external abort issue. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/samsung.c')
-rw-r--r--drivers/tty/serial/samsung.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index 2f8fa184aafa..da1bd4bba8a9 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -1941,7 +1941,11 @@ static int s3c24xx_serial_resume(struct device *dev)
1941 1941
1942 if (port) { 1942 if (port) {
1943 clk_prepare_enable(ourport->clk); 1943 clk_prepare_enable(ourport->clk);
1944 if (!IS_ERR(ourport->baudclk))
1945 clk_prepare_enable(ourport->baudclk);
1944 s3c24xx_serial_resetport(port, s3c24xx_port_to_cfg(port)); 1946 s3c24xx_serial_resetport(port, s3c24xx_port_to_cfg(port));
1947 if (!IS_ERR(ourport->baudclk))
1948 clk_disable_unprepare(ourport->baudclk);
1945 clk_disable_unprepare(ourport->clk); 1949 clk_disable_unprepare(ourport->clk);
1946 1950
1947 uart_resume_port(&s3c24xx_uart_drv, port); 1951 uart_resume_port(&s3c24xx_uart_drv, port);
@@ -1964,7 +1968,11 @@ static int s3c24xx_serial_resume_noirq(struct device *dev)
1964 if (rx_enabled(port)) 1968 if (rx_enabled(port))
1965 uintm &= ~S3C64XX_UINTM_RXD_MSK; 1969 uintm &= ~S3C64XX_UINTM_RXD_MSK;
1966 clk_prepare_enable(ourport->clk); 1970 clk_prepare_enable(ourport->clk);
1971 if (!IS_ERR(ourport->baudclk))
1972 clk_prepare_enable(ourport->baudclk);
1967 wr_regl(port, S3C64XX_UINTM, uintm); 1973 wr_regl(port, S3C64XX_UINTM, uintm);
1974 if (!IS_ERR(ourport->baudclk))
1975 clk_disable_unprepare(ourport->baudclk);
1968 clk_disable_unprepare(ourport->clk); 1976 clk_disable_unprepare(ourport->clk);
1969 } 1977 }
1970 } 1978 }