Lines Matching full:pdc
121 bool use_pdc_rx; /* enable PDC receiver */
122 short pdc_rx_idx; /* current PDC RX buffer */
123 struct atmel_dma_buffer pdc_rx[2]; /* PDC receier */
126 bool use_pdc_tx; /* enable PDC transmitter */
127 struct atmel_dma_buffer pdc_tx; /* PDC transmitter */
560 /* disable PDC transmit */ in atmel_stop_tx()
601 /* re-enable PDC transmit */ in atmel_start_tx()
626 /* enable PDC controller */ in atmel_start_rx()
644 /* disable PDC receive */ in atmel_stop_rx()
1290 * PDC receive. Just schedule the tasklet and let it in atmel_handle_receive()
1431 struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx; in atmel_release_tx_pdc() local
1434 pdc->dma_addr, in atmel_release_tx_pdc()
1435 pdc->dma_size, in atmel_release_tx_pdc()
1446 struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx; in atmel_tx_pdc() local
1451 uart_xmit_advance(port, pdc->ofs); in atmel_tx_pdc()
1452 pdc->ofs = 0; in atmel_tx_pdc()
1456 /* disable PDC transmit */ in atmel_tx_pdc()
1463 pdc->dma_addr, in atmel_tx_pdc()
1464 pdc->dma_size, in atmel_tx_pdc()
1469 pdc->ofs = count; in atmel_tx_pdc()
1471 atmel_uart_writel(port, ATMEL_PDC_TPR, pdc->dma_addr + tail); in atmel_tx_pdc()
1473 /* re-enable PDC transmit */ in atmel_tx_pdc()
1492 struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx; in atmel_prepare_tx_pdc() local
1495 pdc->buf = tport->xmit_buf; in atmel_prepare_tx_pdc()
1496 pdc->dma_addr = dma_map_single(port->dev, in atmel_prepare_tx_pdc()
1497 pdc->buf, in atmel_prepare_tx_pdc()
1500 pdc->dma_size = UART_XMIT_SIZE; in atmel_prepare_tx_pdc()
1501 pdc->ofs = 0; in atmel_prepare_tx_pdc()
1574 struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i]; in atmel_release_rx_pdc() local
1577 pdc->dma_addr, in atmel_release_rx_pdc()
1578 pdc->dma_size, in atmel_release_rx_pdc()
1580 kfree(pdc->buf); in atmel_release_rx_pdc()
1588 struct atmel_dma_buffer *pdc; in atmel_rx_from_pdc() local
1598 pdc = &atmel_port->pdc_rx[rx_idx]; in atmel_rx_from_pdc()
1599 head = atmel_uart_readl(port, ATMEL_PDC_RPR) - pdc->dma_addr; in atmel_rx_from_pdc()
1600 tail = pdc->ofs; in atmel_rx_from_pdc()
1602 /* If the PDC has switched buffers, RPR won't contain in atmel_rx_from_pdc()
1612 head = min(head, pdc->dma_size); in atmel_rx_from_pdc()
1615 dma_sync_single_for_cpu(port->dev, pdc->dma_addr, in atmel_rx_from_pdc()
1616 pdc->dma_size, DMA_FROM_DEVICE); in atmel_rx_from_pdc()
1626 tty_insert_flip_string(tport, pdc->buf + pdc->ofs, in atmel_rx_from_pdc()
1629 dma_sync_single_for_device(port->dev, pdc->dma_addr, in atmel_rx_from_pdc()
1630 pdc->dma_size, DMA_FROM_DEVICE); in atmel_rx_from_pdc()
1633 pdc->ofs = head; in atmel_rx_from_pdc()
1640 if (head >= pdc->dma_size) { in atmel_rx_from_pdc()
1641 pdc->ofs = 0; in atmel_rx_from_pdc()
1642 atmel_uart_writel(port, ATMEL_PDC_RNPR, pdc->dma_addr); in atmel_rx_from_pdc()
1643 atmel_uart_writel(port, ATMEL_PDC_RNCR, pdc->dma_size); in atmel_rx_from_pdc()
1648 } while (head >= pdc->dma_size); in atmel_rx_from_pdc()
1662 struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i]; in atmel_prepare_rx_pdc() local
1664 pdc->buf = kmalloc(PDC_BUFFER_SIZE, GFP_KERNEL); in atmel_prepare_rx_pdc()
1665 if (pdc->buf == NULL) { in atmel_prepare_rx_pdc()
1676 pdc->dma_addr = dma_map_single(port->dev, in atmel_prepare_rx_pdc()
1677 pdc->buf, in atmel_prepare_rx_pdc()
1680 pdc->dma_size = PDC_BUFFER_SIZE; in atmel_prepare_rx_pdc()
1681 pdc->ofs = 0; in atmel_prepare_rx_pdc()
1728 /* DMA/PDC usage specification */ in atmel_init_property()
1967 /* enable PDC controller */ in atmel_startup()
2596 /* Store PDC transmit status and disable it */ in atmel_console_write()
2614 /* Restore PDC transmit status */ in atmel_console_write()