Lines Matching refs:uport
108 struct uart_port uport; member
160 return readl(tup->uport.membase + (reg << tup->uport.regshift)); in tegra_uart_read()
166 writel(val, tup->uport.membase + (reg << tup->uport.regshift)); in tegra_uart_write()
171 return container_of(u, struct tegra_uart_port, uport); in to_tegra_uport()
373 dev_err(tup->uport.dev, in tegra_check_rate_in_range()
401 dev_err(tup->uport.dev, in tegra_set_baudrate()
415 spin_lock_irqsave(&tup->uport.lock, flags); in tegra_set_baudrate()
428 spin_unlock_irqrestore(&tup->uport.lock, flags); in tegra_set_baudrate()
446 tup->uport.icount.overrun++; in tegra_uart_decode_rx_error()
447 dev_dbg(tup->uport.dev, "Got overrun errors\n"); in tegra_uart_decode_rx_error()
451 tup->uport.icount.parity++; in tegra_uart_decode_rx_error()
452 dev_dbg(tup->uport.dev, "Got Parity errors\n"); in tegra_uart_decode_rx_error()
455 tup->uport.icount.frame++; in tegra_uart_decode_rx_error()
456 dev_dbg(tup->uport.dev, "Got frame errors\n"); in tegra_uart_decode_rx_error()
464 if (tup->uport.ignore_status_mask & UART_LSR_BI) in tegra_uart_decode_rx_error()
467 tup->uport.icount.brk++; in tegra_uart_decode_rx_error()
468 dev_dbg(tup->uport.dev, "Got Break\n"); in tegra_uart_decode_rx_error()
470 uart_insert_char(&tup->uport, lsr, UART_LSR_OE, 0, flag); in tegra_uart_decode_rx_error()
488 struct circ_buf *xmit = &tup->uport.state->xmit; in tegra_uart_fill_tx_fifo()
500 tup->uport.icount.tx++; in tegra_uart_fill_tx_fifo()
519 struct circ_buf *xmit = &tup->uport.state->xmit; in tegra_uart_tx_dma_complete()
527 spin_lock_irqsave(&tup->uport.lock, flags); in tegra_uart_tx_dma_complete()
528 uart_xmit_advance(&tup->uport, count); in tegra_uart_tx_dma_complete()
531 uart_write_wakeup(&tup->uport); in tegra_uart_tx_dma_complete()
533 spin_unlock_irqrestore(&tup->uport.lock, flags); in tegra_uart_tx_dma_complete()
539 struct circ_buf *xmit = &tup->uport.state->xmit; in tegra_uart_start_tx_dma()
545 dma_sync_single_for_device(tup->uport.dev, tx_phys_addr, in tegra_uart_start_tx_dma()
552 dev_err(tup->uport.dev, "Not able to get desc for Tx\n"); in tegra_uart_start_tx_dma()
569 struct circ_buf *xmit = &tup->uport.state->xmit; in tegra_uart_start_next_tx()
627 uart_xmit_advance(&tup->uport, count); in tegra_uart_stop_tx()
633 struct circ_buf *xmit = &tup->uport.state->xmit; in tegra_uart_handle_tx_pio()
638 uart_write_wakeup(&tup->uport); in tegra_uart_handle_tx_pio()
659 tup->uport.icount.rx++; in tegra_uart_handle_rx_pio()
661 if (uart_handle_sysrq_char(&tup->uport, ch)) in tegra_uart_handle_rx_pio()
664 if (tup->uport.ignore_status_mask & UART_LSR_DR) in tegra_uart_handle_rx_pio()
681 tup->uport.icount.rx += count; in tegra_uart_copy_rx_to_tty()
683 if (tup->uport.ignore_status_mask & UART_LSR_DR) in tegra_uart_copy_rx_to_tty()
686 dma_sync_single_for_cpu(tup->uport.dev, tup->rx_dma_buf_phys, in tegra_uart_copy_rx_to_tty()
692 dev_err(tup->uport.dev, "RxData copy to tty layer failed\n"); in tegra_uart_copy_rx_to_tty()
694 dma_sync_single_for_device(tup->uport.dev, tup->rx_dma_buf_phys, in tegra_uart_copy_rx_to_tty()
700 struct tty_struct *tty = tty_port_tty_get(&tup->uport.state->port); in do_handle_rx_pio()
701 struct tty_port *port = &tup->uport.state->port; in do_handle_rx_pio()
713 struct tty_port *port = &tup->uport.state->port; in tegra_uart_rx_buffer_push()
728 struct uart_port *u = &tup->uport; in tegra_uart_rx_dma_complete()
738 dev_dbg(tup->uport.dev, "RX DMA is in progress\n"); in tegra_uart_rx_dma_complete()
798 dev_err(tup->uport.dev, "Not able to get desc for Rx\n"); in tegra_uart_start_rx_dma()
821 tup->uport.icount.rng++; in tegra_uart_handle_modem_signal_change()
823 tup->uport.icount.dsr++; in tegra_uart_handle_modem_signal_change()
826 uart_handle_dcd_change(&tup->uport, msr & UART_MSR_DCD); in tegra_uart_handle_modem_signal_change()
829 uart_handle_cts_change(&tup->uport, msr & UART_MSR_CTS); in tegra_uart_handle_modem_signal_change()
835 struct uart_port *u = &tup->uport; in tegra_uart_isr()
912 struct tty_port *port = &tup->uport.state->port; in tegra_uart_stop_rx()
940 unsigned long fifo_empty_time = tup->uport.fifosize * char_time; in tegra_uart_hw_deinit()
954 dev_err(tup->uport.dev, in tegra_uart_hw_deinit()
967 dev_err(tup->uport.dev, in tegra_uart_hw_deinit()
975 spin_lock_irqsave(&tup->uport.lock, flags); in tegra_uart_hw_deinit()
979 spin_unlock_irqrestore(&tup->uport.lock, flags); in tegra_uart_hw_deinit()
1050 dev_err(tup->uport.dev, in tegra_uart_hw_init()
1071 dev_err(tup->uport.dev, "Failed to set baud rate\n"); in tegra_uart_hw_init()
1116 dma_free_coherent(tup->uport.dev, TEGRA_UART_RX_DMA_BUFFER_SIZE, in tegra_uart_dma_channel_free()
1124 dma_unmap_single(tup->uport.dev, tup->tx_dma_buf_phys, in tegra_uart_dma_channel_free()
1141 dma_chan = dma_request_chan(tup->uport.dev, dma_to_memory ? "rx" : "tx"); in tegra_uart_dma_channel_allocate()
1144 dev_err(tup->uport.dev, in tegra_uart_dma_channel_allocate()
1150 dma_buf = dma_alloc_coherent(tup->uport.dev, in tegra_uart_dma_channel_allocate()
1154 dev_err(tup->uport.dev, in tegra_uart_dma_channel_allocate()
1159 dma_sync_single_for_device(tup->uport.dev, dma_phys, in tegra_uart_dma_channel_allocate()
1162 dma_sconfig.src_addr = tup->uport.mapbase; in tegra_uart_dma_channel_allocate()
1169 dma_phys = dma_map_single(tup->uport.dev, in tegra_uart_dma_channel_allocate()
1170 tup->uport.state->xmit.buf, UART_XMIT_SIZE, in tegra_uart_dma_channel_allocate()
1172 if (dma_mapping_error(tup->uport.dev, dma_phys)) { in tegra_uart_dma_channel_allocate()
1173 dev_err(tup->uport.dev, "dma_map_single tx failed\n"); in tegra_uart_dma_channel_allocate()
1177 dma_buf = tup->uport.state->xmit.buf; in tegra_uart_dma_channel_allocate()
1178 dma_sconfig.dst_addr = tup->uport.mapbase; in tegra_uart_dma_channel_allocate()
1188 dev_err(tup->uport.dev, in tegra_uart_dma_channel_allocate()
1341 dev_err(tup->uport.dev, "Failed to set baud rate\n"); in tegra_uart_set_termios()
1372 tup->uport.ignore_status_mask = 0; in tegra_uart_set_termios()
1375 tup->uport.ignore_status_mask |= UART_LSR_DR; in tegra_uart_set_termios()
1377 tup->uport.ignore_status_mask |= UART_LSR_BI; in tegra_uart_set_termios()
1429 tup->uport.line = port; in tegra_uart_parse_dt()
1570 u = &tup->uport; in tegra_uart_probe()
1618 struct uart_port *u = &tup->uport; in tegra_uart_remove()
1628 struct uart_port *u = &tup->uport; in tegra_uart_suspend()
1636 struct uart_port *u = &tup->uport; in tegra_uart_resume()