From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> To: linux-serial@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org, michal.simek@xilinx.com, Raviteja Narayanam <raviteja.narayanam@xilinx.com>, Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Subject: [PATCH v4 2/2] serial: uartps: Add TACTIVE check in cdns_uart_tx_empty function Date: Thu, 19 Mar 2020 15:14:51 +0530 [thread overview] Message-ID: <e2514818af5973be291cc117d07739f068b71639.1584610774.git.shubhrajyoti.datta@xilinx.com> (raw) In-Reply-To: <cover.1584610774.git.shubhrajyoti.datta@xilinx.com> From: Raviteja Narayanam <raviteja.narayanam@xilinx.com> Make sure that all bytes are transmitted out of Uart by monitoring CDNS_UART_SR_TACTIVE bit as well. Signed-off-by: Raviteja Narayanam <raviteja.narayanam@xilinx.com> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> --- drivers/tty/serial/xilinx_uartps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 662b8ab..38cb76a9 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -663,8 +663,8 @@ static unsigned int cdns_uart_tx_empty(struct uart_port *port) unsigned int status; status = readl(port->membase + CDNS_UART_SR) & - CDNS_UART_SR_TXEMPTY; - return status ? TIOCSER_TEMT : 0; + (CDNS_UART_SR_TXEMPTY | CDNS_UART_SR_TACTIVE); + return (status == CDNS_UART_SR_TXEMPTY) ? TIOCSER_TEMT : 0; } /** -- 2.1.1
WARNING: multiple messages have this Message-ID (diff)
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> To: linux-serial@vger.kernel.org Cc: Raviteja Narayanam <raviteja.narayanam@xilinx.com>, gregkh@linuxfoundation.org, Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>, michal.simek@xilinx.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 2/2] serial: uartps: Add TACTIVE check in cdns_uart_tx_empty function Date: Thu, 19 Mar 2020 15:14:51 +0530 [thread overview] Message-ID: <e2514818af5973be291cc117d07739f068b71639.1584610774.git.shubhrajyoti.datta@xilinx.com> (raw) In-Reply-To: <cover.1584610774.git.shubhrajyoti.datta@xilinx.com> From: Raviteja Narayanam <raviteja.narayanam@xilinx.com> Make sure that all bytes are transmitted out of Uart by monitoring CDNS_UART_SR_TACTIVE bit as well. Signed-off-by: Raviteja Narayanam <raviteja.narayanam@xilinx.com> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> --- drivers/tty/serial/xilinx_uartps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 662b8ab..38cb76a9 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -663,8 +663,8 @@ static unsigned int cdns_uart_tx_empty(struct uart_port *port) unsigned int status; status = readl(port->membase + CDNS_UART_SR) & - CDNS_UART_SR_TXEMPTY; - return status ? TIOCSER_TEMT : 0; + (CDNS_UART_SR_TXEMPTY | CDNS_UART_SR_TACTIVE); + return (status == CDNS_UART_SR_TXEMPTY) ? TIOCSER_TEMT : 0; } /** -- 2.1.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-03-19 9:45 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-19 9:44 [PATCH v4 0/2] serial: uartps: Add TACTIVE check Shubhrajyoti Datta 2020-03-19 9:44 ` Shubhrajyoti Datta 2020-03-19 9:44 ` [PATCH v4 1/2] serial: uartps: Remove unconditional wait inside set_termios Shubhrajyoti Datta 2020-03-19 9:44 ` Shubhrajyoti Datta 2020-03-19 9:44 ` Shubhrajyoti Datta [this message] 2020-03-19 9:44 ` [PATCH v4 2/2] serial: uartps: Add TACTIVE check in cdns_uart_tx_empty function Shubhrajyoti Datta 2020-03-21 10:07 ` Maarten Brock 2020-03-21 10:07 ` Maarten Brock
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=e2514818af5973be291cc117d07739f068b71639.1584610774.git.shubhrajyoti.datta@xilinx.com \ --to=shubhrajyoti.datta@xilinx.com \ --cc=gregkh@linuxfoundation.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-serial@vger.kernel.org \ --cc=michal.simek@xilinx.com \ --cc=raviteja.narayanam@xilinx.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.