Lines Matching refs:pdc
651 struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx; in atmel_tx_dma() local
658 xmit->tail += pdc->ofs; in atmel_tx_dma()
661 port->icount.tx += pdc->ofs; in atmel_tx_dma()
662 pdc->ofs = 0; in atmel_tx_dma()
671 pdc->dma_addr, in atmel_tx_dma()
672 pdc->dma_size, in atmel_tx_dma()
676 pdc->ofs = count; in atmel_tx_dma()
678 UART_PUT_TPR(port, pdc->dma_addr + xmit->tail); in atmel_tx_dma()
767 struct atmel_dma_buffer *pdc; in atmel_rx_from_dma() local
777 pdc = &atmel_port->pdc_rx[rx_idx]; in atmel_rx_from_dma()
778 head = UART_GET_RPR(port) - pdc->dma_addr; in atmel_rx_from_dma()
779 tail = pdc->ofs; in atmel_rx_from_dma()
791 head = min(head, pdc->dma_size); in atmel_rx_from_dma()
794 dma_sync_single_for_cpu(port->dev, pdc->dma_addr, in atmel_rx_from_dma()
795 pdc->dma_size, DMA_FROM_DEVICE); in atmel_rx_from_dma()
805 tty_insert_flip_string(tty, pdc->buf + pdc->ofs, count); in atmel_rx_from_dma()
807 dma_sync_single_for_device(port->dev, pdc->dma_addr, in atmel_rx_from_dma()
808 pdc->dma_size, DMA_FROM_DEVICE); in atmel_rx_from_dma()
811 pdc->ofs = head; in atmel_rx_from_dma()
818 if (head >= pdc->dma_size) { in atmel_rx_from_dma()
819 pdc->ofs = 0; in atmel_rx_from_dma()
820 UART_PUT_RNPR(port, pdc->dma_addr); in atmel_rx_from_dma()
821 UART_PUT_RNCR(port, pdc->dma_size); in atmel_rx_from_dma()
826 } while (head >= pdc->dma_size); in atmel_rx_from_dma()
918 struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i]; in atmel_startup() local
920 pdc->buf = kmalloc(PDC_BUFFER_SIZE, GFP_KERNEL); in atmel_startup()
921 if (pdc->buf == NULL) { in atmel_startup()
932 pdc->dma_addr = dma_map_single(port->dev, in atmel_startup()
933 pdc->buf, in atmel_startup()
936 pdc->dma_size = PDC_BUFFER_SIZE; in atmel_startup()
937 pdc->ofs = 0; in atmel_startup()
949 struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx; in atmel_startup() local
952 pdc->buf = xmit->buf; in atmel_startup()
953 pdc->dma_addr = dma_map_single(port->dev, in atmel_startup()
954 pdc->buf, in atmel_startup()
957 pdc->dma_size = UART_XMIT_SIZE; in atmel_startup()
958 pdc->ofs = 0; in atmel_startup()
1019 struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i]; in atmel_shutdown() local
1022 pdc->dma_addr, in atmel_shutdown()
1023 pdc->dma_size, in atmel_shutdown()
1025 kfree(pdc->buf); in atmel_shutdown()
1029 struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx; in atmel_shutdown() local
1032 pdc->dma_addr, in atmel_shutdown()
1033 pdc->dma_size, in atmel_shutdown()