diff options
author | 남영민 <youngmin.nam@samsung.com> | 2017-02-01 19:25:46 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-03 10:12:16 +0100 |
commit | a8a1781b87266a1b006e2223581facd0517e555b (patch) | |
tree | 83d275fcad7121453d6a0e689eabacb2c1db5be0 /drivers/tty/serial | |
parent | 5d1a2388edee77930c8b542cf8be0c92342dbeb4 (diff) | |
download | linux-a8a1781b87266a1b006e2223581facd0517e555b.tar.bz2 |
serial: samsung: enable clock before accessing interrupt mask resister
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>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/samsung.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index a9b309ba24a4..b4f86c219db1 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -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 */ @@ -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); } } |