Lines Matching refs:hvd

413 					 struct mtk_hsdma_vdesc *hvd)  in mtk_hsdma_issue_pending_vdesc()  argument
427 num_sgs = DIV_ROUND_UP(hvd->len, MTK_HSDMA_MAX_LEN); in mtk_hsdma_issue_pending_vdesc()
439 tlen = (hvd->len > MTK_HSDMA_MAX_LEN) ? in mtk_hsdma_issue_pending_vdesc()
440 MTK_HSDMA_MAX_LEN : hvd->len; in mtk_hsdma_issue_pending_vdesc()
450 WRITE_ONCE(txd->desc1, hvd->src); in mtk_hsdma_issue_pending_vdesc()
455 WRITE_ONCE(rxd->desc1, hvd->dest); in mtk_hsdma_issue_pending_vdesc()
459 ring->cb[ring->cur_tptr].vd = &hvd->vd; in mtk_hsdma_issue_pending_vdesc()
466 hvd->src += tlen; in mtk_hsdma_issue_pending_vdesc()
467 hvd->dest += tlen; in mtk_hsdma_issue_pending_vdesc()
468 hvd->len -= tlen; in mtk_hsdma_issue_pending_vdesc()
475 if (!hvd->len) { in mtk_hsdma_issue_pending_vdesc()
503 struct mtk_hsdma_vdesc *hvd; in mtk_hsdma_issue_vchan_pending() local
505 hvd = to_hsdma_vdesc(vd); in mtk_hsdma_issue_vchan_pending()
508 err = mtk_hsdma_issue_pending_vdesc(hsdma, hsdma->pc, hvd); in mtk_hsdma_issue_vchan_pending()
517 if (err == -ENOSPC || hvd->len > 0) in mtk_hsdma_issue_vchan_pending()
536 struct mtk_hsdma_vdesc *hvd; in mtk_hsdma_free_rooms_in_ring() local
578 hvd = to_hsdma_vdesc(cb->vd); in mtk_hsdma_free_rooms_in_ring()
579 hvd->residue -= MTK_HSDMA_DESC_PLEN_GET(rxd->desc2); in mtk_hsdma_free_rooms_in_ring()
681 struct mtk_hsdma_vdesc *hvd; in mtk_hsdma_tx_status() local
696 hvd = to_hsdma_vdesc(vd); in mtk_hsdma_tx_status()
697 bytes = hvd->residue; in mtk_hsdma_tx_status()
723 struct mtk_hsdma_vdesc *hvd; in mtk_hsdma_prep_dma_memcpy() local
725 hvd = kzalloc(sizeof(*hvd), GFP_NOWAIT); in mtk_hsdma_prep_dma_memcpy()
726 if (!hvd) in mtk_hsdma_prep_dma_memcpy()
729 hvd->len = len; in mtk_hsdma_prep_dma_memcpy()
730 hvd->residue = len; in mtk_hsdma_prep_dma_memcpy()
731 hvd->src = src; in mtk_hsdma_prep_dma_memcpy()
732 hvd->dest = dest; in mtk_hsdma_prep_dma_memcpy()
734 return vchan_tx_prep(to_virt_chan(c), &hvd->vd, flags); in mtk_hsdma_prep_dma_memcpy()