Skip to content

Commit

Permalink
serial: samsung: enable clock before accessing interrupt mask resister
Browse files Browse the repository at this point in the history
Ensure that the uart clock is enabled prior to writing to the
interrupt mask register in s3c24xx_serial_resume_noirq function.
Without enabing the uart clock, the uart register cannot be accessed.

Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
남영민 authored and Greg Kroah-Hartman committed Feb 3, 2017
1 parent 5d1a238 commit a8a1781
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/tty/serial/samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -1916,6 +1916,7 @@ static int s3c24xx_serial_resume(struct device *dev)
static int s3c24xx_serial_resume_noirq(struct device *dev)
{
struct uart_port *port = s3c24xx_dev_to_port(dev);
struct s3c24xx_uart_port *ourport = to_ourport(port);

if (port) {
/* restore IRQ mask */
Expand All @@ -1925,7 +1926,9 @@ static int s3c24xx_serial_resume_noirq(struct device *dev)
uintm &= ~S3C64XX_UINTM_TXD_MSK;
if (rx_enabled(port))
uintm &= ~S3C64XX_UINTM_RXD_MSK;
clk_prepare_enable(ourport->clk);
wr_regl(port, S3C64XX_UINTM, uintm);
clk_disable_unprepare(ourport->clk);
}
}

Expand Down

0 comments on commit a8a1781

Please sign in to comment.