/* Check if transmitter in idle (tx reg empty)  */
static unsigned int a2f_port_tx_empty(struct uart_port *port)
/* Check if transmitter in idle (tx reg empty)  */
static unsigned int a2f_port_tx_empty(struct uart_port *port)
{
	volatile struct a2f_cuart_regs	*regs = a2f_cuart_regs_ptr(port);
	unsigned long flags;
	u32 ret;
	spin_lock_irqsave(&port->lock, flags);
	ret = (regs->status & A2F_CORE_UART_ST_TXRDY) ? TIOCSER_TEMT : 0;
	spin_unlock_irqrestore(&port->lock, flags);
	return ret;
}