Lines Matching +full:irda +full:- +full:mode +full:- +full:ports

1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Driver for 8250/16550-type serial ports
79 #define UART_CAP_AFE BIT(11) /* MCR-based hw flow control */
84 #define UART_CAP_IRDA BIT(16) /* UART supports IrDA line discipline */
137 return up->port.serial_in(&up->port, offset); in serial_in()
142 up->port.serial_out(&up->port, offset, value); in serial_out()
146 * serial_lsr_in - Read LSR register and preserve flags across reads
149 * Read LSR register and handle saving non-preserved flags across reads.
151 * up->lsr_saved_flags.
157 u16 lsr = up->lsr_saved_flags; in serial_lsr_in()
160 up->lsr_saved_flags = lsr & up->lsr_save_mask; in serial_lsr_in()
179 serial_icr_write(up, UART_ACR, up->acr | UART_ACR_ICRRD); in serial_icr_read()
182 serial_icr_write(up, UART_ACR, up->acr); in serial_icr_read()
191 return up->dl_read(up); in serial_dl_read()
196 up->dl_write(up, value); in serial_dl_write()
202 lockdep_assert_held_once(&up->port.lock); in serial8250_set_THRI()
204 if (up->ier & UART_IER_THRI) in serial8250_set_THRI()
206 up->ier |= UART_IER_THRI; in serial8250_set_THRI()
207 serial_out(up, UART_IER, up->ier); in serial8250_set_THRI()
214 lockdep_assert_held_once(&up->port.lock); in serial8250_clear_THRI()
216 if (!(up->ier & UART_IER_THRI)) in serial8250_clear_THRI()
218 up->ier &= ~UART_IER_THRI; in serial8250_clear_THRI()
219 serial_out(up, UART_IER, up->ier); in serial8250_clear_THRI()
239 /* MCR <-> TIOCM conversion */
276 /* MSR <-> TIOCM conversion */
297 if (up->gpios) in serial8250_out_MCR()
298 mctrl_gpio_set(up->gpios, serial8250_MCR_to_TIOCM(value)); in serial8250_out_MCR()
307 if (up->gpios) { in serial8250_in_MCR()
310 mctrl_gpio = mctrl_gpio_get_outputs(up->gpios, &mctrl_gpio); in serial8250_in_MCR()
338 #include <linux/soc/ti/omap1-soc.h>
343 switch (pt->port.mapbase) { in is_omap1_8250()
385 struct uart_8250_dma *dma = p->dma; in serial8250_do_prepare_tx_dma()
387 if (dma->prepare_tx_dma) in serial8250_do_prepare_tx_dma()
388 dma->prepare_tx_dma(p); in serial8250_do_prepare_tx_dma()
393 struct uart_8250_dma *dma = p->dma; in serial8250_do_prepare_rx_dma()
395 if (dma->prepare_rx_dma) in serial8250_do_prepare_rx_dma()
396 dma->prepare_rx_dma(p); in serial8250_do_prepare_rx_dma()
401 struct uart_8250_dma *dma = p->dma; in serial8250_tx_dma_running()
403 return dma && dma->tx_running; in serial8250_tx_dma_running()
408 return -1; in serial8250_tx_dma()
413 return -1; in serial8250_rx_dma()
418 return -1; in serial8250_request_dma()
435 /* already in high speed mode */ in ns16550a_goto_highspeed()
439 status |= 0x10; /* 1.625 divisor for baud_base --> 921600 */ in ns16550a_goto_highspeed()
447 return port->minor - 64; in serial_index()