Skip to content

Commit a8a1781

Browse files
남영민gregkh
authored andcommitted
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>
1 parent 5d1a238 commit a8a1781

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/tty/serial/samsung.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,6 +1916,7 @@ static int s3c24xx_serial_resume(struct device *dev)
19161916
static int s3c24xx_serial_resume_noirq(struct device *dev)
19171917
{
19181918
struct uart_port *port = s3c24xx_dev_to_port(dev);
1919+
struct s3c24xx_uart_port *ourport = to_ourport(port);
19191920

19201921
if (port) {
19211922
/* restore IRQ mask */
@@ -1925,7 +1926,9 @@ static int s3c24xx_serial_resume_noirq(struct device *dev)
19251926
uintm &= ~S3C64XX_UINTM_TXD_MSK;
19261927
if (rx_enabled(port))
19271928
uintm &= ~S3C64XX_UINTM_RXD_MSK;
1929+
clk_prepare_enable(ourport->clk);
19281930
wr_regl(port, S3C64XX_UINTM, uintm);
1931+
clk_disable_unprepare(ourport->clk);
19291932
}
19301933
}
19311934

0 commit comments

Comments
 (0)