From: Robert Hodaszi <robert.hodaszi@digi.com>
To: gregkh@linuxfoundation.org, jirislaby@kernel.org,
linux-serial@vger.kernel.org, sherry.sun@nxp.com
Cc: Robert Hodaszi <robert.hodaszi@digi.com>
Subject: [PATCH] Revert "tty: serial: fsl_lpuart: Fix the wrong RXWATER setting for rx dma case"
Date: Wed, 7 Jun 2023 12:34:59 +0200 [thread overview]
Message-ID: <20230607103459.1222426-1-robert.hodaszi@digi.com> (raw)
This reverts commit 9ad9df8447547febe9dd09b040f4528a09e495f0.
LSUART's datasheet incorrectly states that RXWATER must be greater than
0. Having that set to 1 is causing a one character delay on the receive
path.
Signed-off-by: Robert Hodaszi <robert.hodaszi@digi.com>
---
drivers/tty/serial/fsl_lpuart.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 7486a2b8556c..8f1bb0a378d4 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1762,6 +1762,12 @@ static void lpuart32_configure(struct lpuart_port *sport)
{
unsigned long temp;
+ if (sport->lpuart_dma_rx_use) {
+ /* RXWATER must be 0 */
+ temp = lpuart32_read(&sport->port, UARTWATER);
+ temp &= ~(UARTWATER_WATER_MASK << UARTWATER_RXWATER_OFF);
+ lpuart32_write(&sport->port, temp, UARTWATER);
+ }
temp = lpuart32_read(&sport->port, UARTCTRL);
if (!sport->lpuart_dma_rx_use)
temp |= UARTCTRL_RIE | UARTCTRL_ILIE;
--
2.34.1
next reply other threads:[~2023-06-07 12:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 10:34 Robert Hodaszi [this message]
2023-06-07 10:40 ` [PATCH] Revert "tty: serial: fsl_lpuart: Fix the wrong RXWATER setting for rx dma case" Robert Hodaszi
2023-06-07 12:39 ` Sherry Sun
2023-06-07 14:05 ` Robert Hodaszi
2023-06-08 2:20 ` Sherry Sun
2023-06-08 9:35 ` Robert Hodaszi
2023-06-08 9:58 ` Sherry Sun
2023-06-08 10:15 ` Robert Hodaszi
2023-06-08 10:45 ` Sherry Sun
2023-06-08 10:49 ` Robert Hodaszi
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=20230607103459.1222426-1-robert.hodaszi@digi.com \
--to=robert.hodaszi@digi.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=sherry.sun@nxp.com \
/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;
as well as URLs for NNTP newsgroup(s).