Skip to content

Commit

Permalink
serial: samsung: Enable baud clock for UART reset procedure in resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Szyprowski authored and Greg Kroah-Hartman committed Sep 18, 2018
1 parent 3d8b43a commit 1ff3652
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/tty/serial/samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -1941,7 +1941,11 @@ static int s3c24xx_serial_resume(struct device *dev)

if (port) {
clk_prepare_enable(ourport->clk);
if (!IS_ERR(ourport->baudclk))
clk_prepare_enable(ourport->baudclk);
s3c24xx_serial_resetport(port, s3c24xx_port_to_cfg(port));
if (!IS_ERR(ourport->baudclk))
clk_disable_unprepare(ourport->baudclk);
clk_disable_unprepare(ourport->clk);

uart_resume_port(&s3c24xx_uart_drv, port);
Expand All @@ -1964,7 +1968,11 @@ static int s3c24xx_serial_resume_noirq(struct device *dev)
if (rx_enabled(port))
uintm &= ~S3C64XX_UINTM_RXD_MSK;
clk_prepare_enable(ourport->clk);
if (!IS_ERR(ourport->baudclk))
clk_prepare_enable(ourport->baudclk);
wr_regl(port, S3C64XX_UINTM, uintm);
if (!IS_ERR(ourport->baudclk))
clk_disable_unprepare(ourport->baudclk);
clk_disable_unprepare(ourport->clk);
}
}
Expand Down

0 comments on commit 1ff3652

Please sign in to comment.