[PATCH V9 2/3] tty: serial: uartps: Relocate cdns_uart_tx_empty to facilitate rs485

Maarten Brock Maarten.Brock at sttls.nl
Mon Jan 22 08:49:00 PST 2024


> -----Original Message-----
> From: Manikanta Guntupalli <manikanta.guntupalli at amd.com>
> Sent: Thursday, 18 January 2024 08:40
> Subject: [PATCH V9 2/3] tty: serial: uartps: Relocate cdns_uart_tx_empty to
> facilitate rs485
> 
> Relocate cdns_uart_tx_empty function to avoid prototype statement in
> rs485 changes.
> Update return check with uart_tx_stopped() in cdns_uart_handle_tx().
> 
> Signed-off-by: Manikanta Guntupalli <manikanta.guntupalli at amd.com>
> ---
> --- a/drivers/tty/serial/xilinx_uartps.c
> +++ b/drivers/tty/serial/xilinx_uartps.c
> @@ -316,7 +331,7 @@ static void cdns_uart_handle_tx(void *dev_id)
>  	struct circ_buf *xmit = &port->state->xmit;
>  	unsigned int numbytes;
> 
> -	if (uart_circ_empty(xmit)) {
> +	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {

Can you please also insert a comment here?
+ 		/* Disable the TX Empty interrupt */

>  		writel(CDNS_UART_IXR_TXEMPTY, port->membase +
> CDNS_UART_IDR);
>  		return;
>  	}
 
Kind regards,
Maarten Brock



More information about the linux-arm-kernel mailing list