Lines Matching refs:dma

11 int qce_dma_request(struct device *dev, struct qce_dma_data *dma)  in qce_dma_request()  argument
15 dma->txchan = dma_request_chan(dev, "tx"); in qce_dma_request()
16 if (IS_ERR(dma->txchan)) in qce_dma_request()
17 return PTR_ERR(dma->txchan); in qce_dma_request()
19 dma->rxchan = dma_request_chan(dev, "rx"); in qce_dma_request()
20 if (IS_ERR(dma->rxchan)) { in qce_dma_request()
21 ret = PTR_ERR(dma->rxchan); in qce_dma_request()
25 dma->result_buf = kmalloc(QCE_RESULT_BUF_SZ + QCE_IGNORE_BUF_SZ, in qce_dma_request()
27 if (!dma->result_buf) { in qce_dma_request()
32 dma->ignore_buf = dma->result_buf + QCE_RESULT_BUF_SZ; in qce_dma_request()
36 dma_release_channel(dma->rxchan); in qce_dma_request()
38 dma_release_channel(dma->txchan); in qce_dma_request()
42 void qce_dma_release(struct qce_dma_data *dma) in qce_dma_release() argument
44 dma_release_channel(dma->txchan); in qce_dma_release()
45 dma_release_channel(dma->rxchan); in qce_dma_release()
46 kfree(dma->result_buf); in qce_dma_release()
99 int qce_dma_prep_sgs(struct qce_dma_data *dma, struct scatterlist *rx_sg, in qce_dma_prep_sgs() argument
103 struct dma_chan *rxchan = dma->rxchan; in qce_dma_prep_sgs()
104 struct dma_chan *txchan = dma->txchan; in qce_dma_prep_sgs()
117 void qce_dma_issue_pending(struct qce_dma_data *dma) in qce_dma_issue_pending() argument
119 dma_async_issue_pending(dma->rxchan); in qce_dma_issue_pending()
120 dma_async_issue_pending(dma->txchan); in qce_dma_issue_pending()
123 int qce_dma_terminate_all(struct qce_dma_data *dma) in qce_dma_terminate_all() argument
127 ret = dmaengine_terminate_all(dma->rxchan); in qce_dma_terminate_all()
128 return ret ?: dmaengine_terminate_all(dma->txchan); in qce_dma_terminate_all()