From: Sherry Sun <sherry.sun@nxp.com>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org, michael@walle.cc
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-imx@nxp.com
Subject: [PATCH 2/2] tty: serial: fsl_lpuart: writing a 1 and then a 0 to trigger a break character
Date: Fri, 15 Jul 2022 10:59:44 +0800 [thread overview]
Message-ID: <20220715025944.11076-3-sherry.sun@nxp.com> (raw)
In-Reply-To: <20220715025944.11076-1-sherry.sun@nxp.com>
According to the lpuart reference manual, need to writing a 1 and then a
0 to the UARTCTRL_SBK field queues a break character in the transmit
data stream. Only writing a 1 cannot trigger the break character, so fix
it.
Fixes: 380c966c093e ("tty: serial: fsl_lpuart: add 32-bit register interface support")
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
---
drivers/tty/serial/fsl_lpuart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index b6365566a460..8a4aae7dbd99 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1486,7 +1486,7 @@ static void lpuart32_break_ctl(struct uart_port *port, int break_state)
temp = lpuart32_read(port, UARTCTRL) & ~UARTCTRL_SBK;
if (break_state != 0)
- temp |= UARTCTRL_SBK;
+ lpuart32_write(port, temp | UARTCTRL_SBK, UARTCTRL);
lpuart32_write(port, temp, UARTCTRL);
}
--
2.17.1
next prev parent reply other threads:[~2022-07-15 3:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-15 2:59 [PATCH 0/2] fsl_lpuart: fix the bugs in received break signal count and send break signal Sherry Sun
2022-07-15 2:59 ` [PATCH 1/2] tty: serial: fsl_lpuart: correct the count of break characters Sherry Sun
2022-07-15 6:58 ` Michael Walle
2022-07-15 7:22 ` Sherry Sun
2022-07-15 12:33 ` Michael Walle
2022-07-15 2:59 ` Sherry Sun [this message]
2022-07-15 6:47 ` [PATCH 2/2] tty: serial: fsl_lpuart: writing a 1 and then a 0 to trigger a break character Michael Walle
2022-07-15 7:20 ` Sherry Sun
2022-07-15 7:42 ` Michael Walle
2022-07-15 9:18 ` Sherry Sun
2022-07-15 11:52 ` Michael Walle
2022-07-18 7:02 ` Jiri Slaby
2022-07-22 9:41 ` Sherry Sun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220715025944.11076-3-sherry.sun@nxp.com \
--to=sherry.sun@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=michael@walle.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox