pxa.c (14e77332e74603efab8347c89d3cda447c3b97c9) | pxa.c (d11cc8c3c4b65e00e01f20a920c5fa412415204a) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Based on drivers/serial/8250.c by Russell King. 4 * 5 * Author: Nicolas Pitre 6 * Created: Feb 20, 2003 7 * Copyright: (C) 2003 Monta Vista Software, Inc. 8 * --- 160 unchanged lines hidden (view full) --- 169 * No more data in FIFO: Re-enable RTO interrupt via IER[RTOIE] 170 */ 171 up->ier |= UART_IER_RTOIE; 172 serial_out(up, UART_IER, up->ier); 173} 174 175static void transmit_chars(struct uart_pxa_port *up) 176{ | 1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Based on drivers/serial/8250.c by Russell King. 4 * 5 * Author: Nicolas Pitre 6 * Created: Feb 20, 2003 7 * Copyright: (C) 2003 Monta Vista Software, Inc. 8 * --- 160 unchanged lines hidden (view full) --- 169 * No more data in FIFO: Re-enable RTO interrupt via IER[RTOIE] 170 */ 171 up->ier |= UART_IER_RTOIE; 172 serial_out(up, UART_IER, up->ier); 173} 174 175static void transmit_chars(struct uart_pxa_port *up) 176{ |
177 struct circ_buf *xmit = &up->port.state->xmit; 178 int count; | 177 u8 ch; |
179 | 178 |
180 if (up->port.x_char) { 181 serial_out(up, UART_TX, up->port.x_char); 182 up->port.icount.tx++; 183 up->port.x_char = 0; 184 return; 185 } 186 if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { 187 serial_pxa_stop_tx(&up->port); 188 return; 189 } 190 191 count = up->port.fifosize / 2; 192 do { 193 serial_out(up, UART_TX, xmit->buf[xmit->tail]); 194 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); 195 up->port.icount.tx++; 196 if (uart_circ_empty(xmit)) 197 break; 198 } while (--count > 0); 199 200 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) 201 uart_write_wakeup(&up->port); 202 203 204 if (uart_circ_empty(xmit)) 205 serial_pxa_stop_tx(&up->port); | 179 uart_port_tx_limited(&up->port, ch, up->port.fifosize / 2, 180 true, 181 serial_out(up, UART_TX, ch), 182 ({})); |
206} 207 208static void serial_pxa_start_tx(struct uart_port *port) 209{ 210 struct uart_pxa_port *up = (struct uart_pxa_port *)port; 211 212 if (!(up->ier & UART_IER_THRI)) { 213 up->ier |= UART_IER_THRI; --- 718 unchanged lines hidden --- | 183} 184 185static void serial_pxa_start_tx(struct uart_port *port) 186{ 187 struct uart_pxa_port *up = (struct uart_pxa_port *)port; 188 189 if (!(up->ier & UART_IER_THRI)) { 190 up->ier |= UART_IER_THRI; --- 718 unchanged lines hidden --- |