Commit 400caa3d authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Greg Kroah-Hartman

serial: samsung: Enable baud clock for UART reset procedure in resume

[ Upstream commit 1ff3652b ]

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: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 30cfa3eb
...@@ -1944,7 +1944,11 @@ static int s3c24xx_serial_resume(struct device *dev) ...@@ -1944,7 +1944,11 @@ static int s3c24xx_serial_resume(struct device *dev)
if (port) { if (port) {
clk_prepare_enable(ourport->clk); clk_prepare_enable(ourport->clk);
if (!IS_ERR(ourport->baudclk))
clk_prepare_enable(ourport->baudclk);
s3c24xx_serial_resetport(port, s3c24xx_port_to_cfg(port)); s3c24xx_serial_resetport(port, s3c24xx_port_to_cfg(port));
if (!IS_ERR(ourport->baudclk))
clk_disable_unprepare(ourport->baudclk);
clk_disable_unprepare(ourport->clk); clk_disable_unprepare(ourport->clk);
uart_resume_port(&s3c24xx_uart_drv, port); uart_resume_port(&s3c24xx_uart_drv, port);
...@@ -1967,7 +1971,11 @@ static int s3c24xx_serial_resume_noirq(struct device *dev) ...@@ -1967,7 +1971,11 @@ static int s3c24xx_serial_resume_noirq(struct device *dev)
if (rx_enabled(port)) if (rx_enabled(port))
uintm &= ~S3C64XX_UINTM_RXD_MSK; uintm &= ~S3C64XX_UINTM_RXD_MSK;
clk_prepare_enable(ourport->clk); clk_prepare_enable(ourport->clk);
if (!IS_ERR(ourport->baudclk))
clk_prepare_enable(ourport->baudclk);
wr_regl(port, S3C64XX_UINTM, uintm); wr_regl(port, S3C64XX_UINTM, uintm);
if (!IS_ERR(ourport->baudclk))
clk_disable_unprepare(ourport->baudclk);
clk_disable_unprepare(ourport->clk); clk_disable_unprepare(ourport->clk);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment