Lines Matching full:pdc
119 bool use_pdc_rx; /* enable PDC receiver */
120 short pdc_rx_idx; /* current PDC RX buffer */
121 struct atmel_dma_buffer pdc_rx[2]; /* PDC receier */
124 bool use_pdc_tx; /* enable PDC transmitter */
125 struct atmel_dma_buffer pdc_tx; /* PDC transmitter */
558 /* disable PDC transmit */ in atmel_stop_tx()
599 /* re-enable PDC transmit */ in atmel_start_tx()
624 /* enable PDC controller */ in atmel_start_rx()
642 /* disable PDC receive */ in atmel_stop_rx()
1299 * PDC receive. Just schedule the tasklet and let it in atmel_handle_receive()
1440 struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx; in atmel_release_tx_pdc() local
1443 pdc->dma_addr, in atmel_release_tx_pdc()
1444 pdc->dma_size, in atmel_release_tx_pdc()
1455 struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx; in atmel_tx_pdc() local
1461 uart_xmit_advance(port, pdc->ofs); in atmel_tx_pdc()
1462 pdc->ofs = 0; in atmel_tx_pdc()
1466 /* disable PDC transmit */ in atmel_tx_pdc()
1471 pdc->dma_addr, in atmel_tx_pdc()
1472 pdc->dma_size, in atmel_tx_pdc()
1476 pdc->ofs = count; in atmel_tx_pdc()
1479 pdc->dma_addr + xmit->tail); in atmel_tx_pdc()
1481 /* re-enable PDC transmit */ in atmel_tx_pdc()
1500 struct atmel_dma_buffer *pdc = &atmel_port->pdc_tx; in atmel_prepare_tx_pdc() local
1503 pdc->buf = xmit->buf; in atmel_prepare_tx_pdc()
1504 pdc->dma_addr = dma_map_single(port->dev, in atmel_prepare_tx_pdc()
1505 pdc->buf, in atmel_prepare_tx_pdc()
1508 pdc->dma_size = UART_XMIT_SIZE; in atmel_prepare_tx_pdc()
1509 pdc->ofs = 0; in atmel_prepare_tx_pdc()
1582 struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i]; in atmel_release_rx_pdc() local
1585 pdc->dma_addr, in atmel_release_rx_pdc()
1586 pdc->dma_size, in atmel_release_rx_pdc()
1588 kfree(pdc->buf); in atmel_release_rx_pdc()
1596 struct atmel_dma_buffer *pdc; in atmel_rx_from_pdc() local
1606 pdc = &atmel_port->pdc_rx[rx_idx]; in atmel_rx_from_pdc()
1607 head = atmel_uart_readl(port, ATMEL_PDC_RPR) - pdc->dma_addr; in atmel_rx_from_pdc()
1608 tail = pdc->ofs; in atmel_rx_from_pdc()
1610 /* If the PDC has switched buffers, RPR won't contain in atmel_rx_from_pdc()
1620 head = min(head, pdc->dma_size); in atmel_rx_from_pdc()
1623 dma_sync_single_for_cpu(port->dev, pdc->dma_addr, in atmel_rx_from_pdc()
1624 pdc->dma_size, DMA_FROM_DEVICE); in atmel_rx_from_pdc()
1634 tty_insert_flip_string(tport, pdc->buf + pdc->ofs, in atmel_rx_from_pdc()
1637 dma_sync_single_for_device(port->dev, pdc->dma_addr, in atmel_rx_from_pdc()
1638 pdc->dma_size, DMA_FROM_DEVICE); in atmel_rx_from_pdc()
1641 pdc->ofs = head; in atmel_rx_from_pdc()
1648 if (head >= pdc->dma_size) { in atmel_rx_from_pdc()
1649 pdc->ofs = 0; in atmel_rx_from_pdc()
1650 atmel_uart_writel(port, ATMEL_PDC_RNPR, pdc->dma_addr); in atmel_rx_from_pdc()
1651 atmel_uart_writel(port, ATMEL_PDC_RNCR, pdc->dma_size); in atmel_rx_from_pdc()
1656 } while (head >= pdc->dma_size); in atmel_rx_from_pdc()
1670 struct atmel_dma_buffer *pdc = &atmel_port->pdc_rx[i]; in atmel_prepare_rx_pdc() local
1672 pdc->buf = kmalloc(PDC_BUFFER_SIZE, GFP_KERNEL); in atmel_prepare_rx_pdc()
1673 if (pdc->buf == NULL) { in atmel_prepare_rx_pdc()
1684 pdc->dma_addr = dma_map_single(port->dev, in atmel_prepare_rx_pdc()
1685 pdc->buf, in atmel_prepare_rx_pdc()
1688 pdc->dma_size = PDC_BUFFER_SIZE; in atmel_prepare_rx_pdc()
1689 pdc->ofs = 0; in atmel_prepare_rx_pdc()
1736 /* DMA/PDC usage specification */ in atmel_init_property()
1975 /* enable PDC controller */ in atmel_startup()
2604 /* Store PDC transmit status and disable it */ in atmel_console_write()
2622 /* Restore PDC transmit status */ in atmel_console_write()