diff mbox series

tty: serial: samsung_tty: fix s3c24xx_serial_set_mctrl()

Message ID 20220712140745.30362-1-m.szyprowski@samsung.com (mailing list archive)
State Accepted
Commit 1d46c08d246e2e0a2d81985727392a5a8348d06a
Headers show
Series tty: serial: samsung_tty: fix s3c24xx_serial_set_mctrl() | expand

Commit Message

Marek Szyprowski July 12, 2022, 2:07 p.m. UTC
S3C2410_UCON is a 32bit register, so it must be read with rd_regl()
instead of rd_reg(), otherwise the upper bits will be zeroed. Fix this.

Fixes: 72a43046b61a ("tty: serial: samsung_tty: loopback mode support")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/tty/serial/samsung_tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Krzysztof Kozlowski July 12, 2022, 2:32 p.m. UTC | #1
On 12/07/2022 16:07, Marek Szyprowski wrote:
> S3C2410_UCON is a 32bit register, so it must be read with rd_regl()
> instead of rd_reg(), otherwise the upper bits will be zeroed. Fix this.
> 
> Fixes: 72a43046b61a ("tty: serial: samsung_tty: loopback mode support")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof
Chanho Park July 13, 2022, 12:01 a.m. UTC | #2
> Subject: [PATCH] tty: serial: samsung_tty: fix s3c24xx_serial_set_mctrl()
> 
> S3C2410_UCON is a 32bit register, so it must be read with rd_regl()
> instead of rd_reg(), otherwise the upper bits will be zeroed. Fix this.
> 
> Fixes: 72a43046b61a ("tty: serial: samsung_tty: loopback mode support")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Thanks for the fix.

Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Tested-by: Chanho Park <chanho61.park@samsung.com>

Best Regards,
Chanho Park
diff mbox series

Patch

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index f009b312faf6..b7a4b47ce74e 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -1017,7 +1017,7 @@  static unsigned int s3c24xx_serial_get_mctrl(struct uart_port *port)
 static void s3c24xx_serial_set_mctrl(struct uart_port *port, unsigned int mctrl)
 {
 	unsigned int umcon = rd_regl(port, S3C2410_UMCON);
-	unsigned int ucon = rd_reg(port, S3C2410_UCON);
+	unsigned int ucon = rd_regl(port, S3C2410_UCON);
 
 	if (mctrl & TIOCM_RTS)
 		umcon |= S3C2410_UMCOM_RTS_LOW;