diff options
Diffstat (limited to 'drivers/tty/serial/lpc32xx_hs.c')
| -rw-r--r-- | drivers/tty/serial/lpc32xx_hs.c | 33 | 
1 files changed, 4 insertions, 29 deletions
diff --git a/drivers/tty/serial/lpc32xx_hs.c b/drivers/tty/serial/lpc32xx_hs.c index ed47f4768338..b38fe4728c26 100644 --- a/drivers/tty/serial/lpc32xx_hs.c +++ b/drivers/tty/serial/lpc32xx_hs.c @@ -276,8 +276,6 @@ static void __serial_lpc32xx_rx(struct uart_port *port)  	tty_flip_buffer_push(tport);  } -static void serial_lpc32xx_stop_tx(struct uart_port *port); -  static bool serial_lpc32xx_tx_ready(struct uart_port *port)  {  	u32 level = readl(LPC32XX_HSUART_LEVEL(port->membase)); @@ -287,34 +285,11 @@ static bool serial_lpc32xx_tx_ready(struct uart_port *port)  static void __serial_lpc32xx_tx(struct uart_port *port)  { -	struct circ_buf *xmit = &port->state->xmit; - -	if (port->x_char) { -		writel((u32)port->x_char, LPC32XX_HSUART_FIFO(port->membase)); -		port->icount.tx++; -		port->x_char = 0; -		return; -	} - -	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) -		goto exit_tx; - -	/* Transfer data */ -	while (serial_lpc32xx_tx_ready(port)) { -		writel((u32) xmit->buf[xmit->tail], -		       LPC32XX_HSUART_FIFO(port->membase)); -		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); -		port->icount.tx++; -		if (uart_circ_empty(xmit)) -			break; -	} - -	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) -		uart_write_wakeup(port); +	u8 ch; -exit_tx: -	if (uart_circ_empty(xmit)) -		serial_lpc32xx_stop_tx(port); +	uart_port_tx(port, ch, +		serial_lpc32xx_tx_ready(port), +		writel(ch, LPC32XX_HSUART_FIFO(port->membase)));  }  static irqreturn_t serial_lpc32xx_interrupt(int irq, void *dev_id)  | 
