Lines Matching refs:dma
377 struct dma_controller *dma = musb->dma_controller; in musb_advance_schedule() local
382 dma->channel_release(ep->rx_channel); in musb_advance_schedule()
388 dma->channel_release(ep->tx_channel); in musb_advance_schedule()
621 static bool musb_tx_dma_program(struct dma_controller *dma, in musb_tx_dma_program() argument
670 if (!dma->channel_program(channel, pkt_size, mode, in musb_tx_dma_program()
672 dma->channel_release(channel); in musb_tx_dma_program()
1120 struct dma_channel *dma; in musb_host_tx() local
1133 dma = is_dma_capable() ? hw_ep->tx_channel : NULL; in musb_host_tx()
1135 dma ? ", dma" : ""); in musb_host_tx()
1170 if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) { in musb_host_tx()
1171 dma->status = MUSB_DMA_STATUS_CORE_ABORT; in musb_host_tx()
1172 (void) musb->dma_controller->channel_abort(dma); in musb_host_tx()
1196 if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) { in musb_host_tx()
1201 if (is_dma_capable() && dma && !status) { in musb_host_tx()
1262 if (!status || dma || usb_pipeisoc(pipe)) { in musb_host_tx()
1263 if (dma) in musb_host_tx()
1264 length = dma->actual_len; in musb_host_tx()
1284 } else if (dma && urb->transfer_buffer_length == qh->offset) { in musb_host_tx()
1317 } else if ((usb_pipeisoc(pipe) || transfer_pending) && dma) { in musb_host_tx()
1393 struct dma_channel *dma; in musb_bulk_rx_nak_timeout() local
1401 dma = is_dma_capable() ? ep->rx_channel : NULL; in musb_bulk_rx_nak_timeout()
1412 if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) { in musb_bulk_rx_nak_timeout()
1413 dma->status = MUSB_DMA_STATUS_CORE_ABORT; in musb_bulk_rx_nak_timeout()
1414 musb->dma_controller->channel_abort(dma); in musb_bulk_rx_nak_timeout()
1415 urb->actual_length += dma->actual_len; in musb_bulk_rx_nak_timeout()
1416 dma->actual_len = 0L; in musb_bulk_rx_nak_timeout()
1449 struct dma_channel *dma; in musb_host_rx() local
1454 dma = is_dma_capable() ? hw_ep->rx_channel : NULL; in musb_host_rx()
1476 dma ? dma->actual_len : 0); in musb_host_rx()
1531 if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) { in musb_host_rx()
1532 dma->status = MUSB_DMA_STATUS_CORE_ABORT; in musb_host_rx()
1533 (void) musb->dma_controller->channel_abort(dma); in musb_host_rx()
1534 xfer_len = dma->actual_len; in musb_host_rx()
1542 if (unlikely(dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY)) { in musb_host_rx()
1562 if (dma_channel_status(dma) == MUSB_DMA_STATUS_BUSY) { in musb_host_rx()
1563 dma->status = MUSB_DMA_STATUS_CORE_ABORT; in musb_host_rx()
1564 (void) musb->dma_controller->channel_abort(dma); in musb_host_rx()
1565 xfer_len = dma->actual_len; in musb_host_rx()
1570 xfer_len, dma ? ", dma" : ""); in musb_host_rx()
1578 if (dma && (rx_csr & MUSB_RXCSR_DMAENAB)) { in musb_host_rx()
1579 xfer_len = dma->actual_len; in musb_host_rx()
1609 || dma->actual_len < qh->maxpacket); in musb_host_rx()
1644 if (dma) { in musb_host_rx()
1690 dma->desired_mode = 0; in musb_host_rx()
1700 dma->desired_mode = 1; in musb_host_rx()
1703 dma->desired_mode = 0; in musb_host_rx()
1729 if (dma->desired_mode == 0) in musb_host_rx()
1747 dma, qh->maxpacket, in musb_host_rx()
1748 dma->desired_mode, buf, length); in musb_host_rx()
1751 c->channel_release(dma); in musb_host_rx()
1753 dma = NULL; in musb_host_rx()
1763 if (!dma) { in musb_host_rx()
2140 struct dma_channel *dma; local
2142 dma = is_in ? ep->rx_channel : ep->tx_channel;
2143 if (dma) {
2144 status = ep->musb->dma_controller->channel_abort(dma);
2149 urb->actual_length += dma->actual_len;