Lines Matching refs:async_desc
612 struct bam_async_desc *async_desc; in bam_prep_slave_sg() local
629 async_desc = kzalloc(struct_size(async_desc, desc, num_alloc), in bam_prep_slave_sg()
632 if (!async_desc) in bam_prep_slave_sg()
636 async_desc->flags |= DESC_FLAG_NWD; in bam_prep_slave_sg()
639 async_desc->flags |= DESC_FLAG_EOT; in bam_prep_slave_sg()
641 async_desc->num_desc = num_alloc; in bam_prep_slave_sg()
642 async_desc->curr_desc = async_desc->desc; in bam_prep_slave_sg()
643 async_desc->dir = direction; in bam_prep_slave_sg()
646 desc = async_desc->desc; in bam_prep_slave_sg()
667 async_desc->length += le16_to_cpu(desc->size); in bam_prep_slave_sg()
672 return vchan_tx_prep(&bchan->vc, &async_desc->vd, flags); in bam_prep_slave_sg()
686 struct bam_async_desc *async_desc, *tmp; in bam_dma_terminate_all() local
706 async_desc = list_first_entry(&bchan->desc_list, in bam_dma_terminate_all()
708 bam_chan_init_hw(bchan, async_desc->dir); in bam_dma_terminate_all()
711 list_for_each_entry_safe(async_desc, tmp, in bam_dma_terminate_all()
713 list_add(&async_desc->vd.node, &bchan->vc.desc_issued); in bam_dma_terminate_all()
714 list_del(&async_desc->desc_node); in bam_dma_terminate_all()
788 struct bam_async_desc *async_desc, *tmp; in process_channel_irqs() local
819 list_for_each_entry_safe(async_desc, tmp, in process_channel_irqs()
822 if (avail < async_desc->xfer_len) in process_channel_irqs()
826 bchan->head += async_desc->xfer_len; in process_channel_irqs()
829 async_desc->num_desc -= async_desc->xfer_len; in process_channel_irqs()
830 async_desc->curr_desc += async_desc->xfer_len; in process_channel_irqs()
831 avail -= async_desc->xfer_len; in process_channel_irqs()
838 if (!async_desc->num_desc) { in process_channel_irqs()
839 vchan_cookie_complete(&async_desc->vd); in process_channel_irqs()
841 list_add(&async_desc->vd.node, in process_channel_irqs()
844 list_del(&async_desc->desc_node); in process_channel_irqs()
906 struct bam_async_desc *async_desc; in bam_tx_status() local
925 list_for_each_entry(async_desc, &bchan->desc_list, desc_node) { in bam_tx_status()
926 if (async_desc->vd.tx.cookie != cookie) in bam_tx_status()
929 for (i = 0; i < async_desc->num_desc; i++) in bam_tx_status()
931 async_desc->curr_desc[i].size); in bam_tx_status()
977 struct bam_async_desc *async_desc = NULL; in bam_start_dma() local
997 async_desc = container_of(vd, struct bam_async_desc, vd); in bam_start_dma()
1001 bam_chan_init_hw(bchan, async_desc->dir); in bam_start_dma()
1005 bam_apply_new_config(bchan, async_desc->dir); in bam_start_dma()
1007 desc = async_desc->curr_desc; in bam_start_dma()
1011 if (async_desc->num_desc > avail) in bam_start_dma()
1012 async_desc->xfer_len = avail; in bam_start_dma()
1014 async_desc->xfer_len = async_desc->num_desc; in bam_start_dma()
1017 if (async_desc->num_desc == async_desc->xfer_len) in bam_start_dma()
1018 desc[async_desc->xfer_len - 1].flags |= in bam_start_dma()
1019 cpu_to_le16(async_desc->flags); in bam_start_dma()
1023 dmaengine_desc_get_callback(&async_desc->vd.tx, &cb); in bam_start_dma()
1033 if (((avail <= async_desc->xfer_len) || !vd || in bam_start_dma()
1035 !(async_desc->flags & DESC_FLAG_EOT)) in bam_start_dma()
1036 desc[async_desc->xfer_len - 1].flags |= in bam_start_dma()
1039 if (bchan->tail + async_desc->xfer_len > MAX_DESCRIPTORS) { in bam_start_dma()
1045 (async_desc->xfer_len - partial) * in bam_start_dma()
1049 async_desc->xfer_len * in bam_start_dma()
1053 bchan->tail += async_desc->xfer_len; in bam_start_dma()
1055 list_add_tail(&async_desc->desc_node, &bchan->desc_list); in bam_start_dma()
1119 struct bam_async_desc *async_desc = container_of(vd, in bam_dma_free_desc() local
1122 kfree(async_desc); in bam_dma_free_desc()