* [RESEND PATCH] serial: samsung: enable clock before accessing interrupt mask resister
[not found] <CGME20170201102546epcas1p25107505cc2ff66f06211f945d2ddd679@epcas1p2.samsung.com>
@ 2017-02-01 10:25 ` 남영민
2017-02-08 13:23 ` Tobias Jakobi
0 siblings, 1 reply; 2+ messages in thread
From: 남영민 @ 2017-02-01 10:25 UTC (permalink / raw)
To: gregkh, jslaby; +Cc: linux-serial, linux-samsung-soc, tjakobi
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>
---
drivers/tty/serial/samsung.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index f44615f..06488fd 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -1921,6 +1921,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 */
@@ -1930,7 +1931,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);
}
}
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RESEND PATCH] serial: samsung: enable clock before accessing interrupt mask resister
2017-02-01 10:25 ` [RESEND PATCH] serial: samsung: enable clock before accessing interrupt mask resister 남영민
@ 2017-02-08 13:23 ` Tobias Jakobi
0 siblings, 0 replies; 2+ messages in thread
From: Tobias Jakobi @ 2017-02-08 13:23 UTC (permalink / raw)
To: 남영민, gregkh, jslaby; +Cc: linux-serial, linux-samsung-soc
Hello Youngmin,
I was wondering if this fixes an actual issue. The changes look sane,
but shouldn't be current code trigger some imprecise external abort on
system resume then?
I'm asking because on my Exynos4412 board nothing like that happens on
system resume. And if I read the code correctly,
s3c24xx_serial_has_interrupt_mask() returns 1 in my case.
With best wishes,
Tobias
남영민 wrote:
> 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>
> ---
> drivers/tty/serial/samsung.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
> index f44615f..06488fd 100644
> --- a/drivers/tty/serial/samsung.c
> +++ b/drivers/tty/serial/samsung.c
> @@ -1921,6 +1921,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 */
> @@ -1930,7 +1931,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);
> }
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-08 13:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20170201102546epcas1p25107505cc2ff66f06211f945d2ddd679@epcas1p2.samsung.com>
2017-02-01 10:25 ` [RESEND PATCH] serial: samsung: enable clock before accessing interrupt mask resister 남영민
2017-02-08 13:23 ` Tobias Jakobi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).