Lines Matching refs:async_desc
654 struct bam_async_desc *async_desc; in bam_prep_slave_sg() local
671 async_desc = kzalloc(struct_size(async_desc, desc, num_alloc), in bam_prep_slave_sg()
674 if (!async_desc) in bam_prep_slave_sg()
678 async_desc->flags |= DESC_FLAG_NWD; in bam_prep_slave_sg()
681 async_desc->flags |= DESC_FLAG_EOT; in bam_prep_slave_sg()
683 async_desc->num_desc = num_alloc; in bam_prep_slave_sg()
684 async_desc->curr_desc = async_desc->desc; in bam_prep_slave_sg()
685 async_desc->dir = direction; in bam_prep_slave_sg()
688 desc = async_desc->desc; in bam_prep_slave_sg()
709 async_desc->length += le16_to_cpu(desc->size); in bam_prep_slave_sg()
714 return vchan_tx_prep(&bchan->vc, &async_desc->vd, flags); in bam_prep_slave_sg()
728 struct bam_async_desc *async_desc, *tmp; in bam_dma_terminate_all() local
748 async_desc = list_first_entry(&bchan->desc_list, in bam_dma_terminate_all()
750 bam_chan_init_hw(bchan, async_desc->dir); in bam_dma_terminate_all()
753 list_for_each_entry_safe(async_desc, tmp, in bam_dma_terminate_all()
755 list_add(&async_desc->vd.node, &bchan->vc.desc_issued); in bam_dma_terminate_all()
756 list_del(&async_desc->desc_node); in bam_dma_terminate_all()
830 struct bam_async_desc *async_desc, *tmp; in process_channel_irqs() local
861 list_for_each_entry_safe(async_desc, tmp, in process_channel_irqs()
864 if (avail < async_desc->xfer_len) in process_channel_irqs()
868 bchan->head += async_desc->xfer_len; in process_channel_irqs()
871 async_desc->num_desc -= async_desc->xfer_len; in process_channel_irqs()
872 async_desc->curr_desc += async_desc->xfer_len; in process_channel_irqs()
873 avail -= async_desc->xfer_len; in process_channel_irqs()
880 if (!async_desc->num_desc) { in process_channel_irqs()
881 vchan_cookie_complete(&async_desc->vd); in process_channel_irqs()
883 list_add(&async_desc->vd.node, in process_channel_irqs()
886 list_del(&async_desc->desc_node); in process_channel_irqs()
948 struct bam_async_desc *async_desc; in bam_tx_status() local
967 list_for_each_entry(async_desc, &bchan->desc_list, desc_node) { in bam_tx_status()
968 if (async_desc->vd.tx.cookie != cookie) in bam_tx_status()
971 for (i = 0; i < async_desc->num_desc; i++) in bam_tx_status()
973 async_desc->curr_desc[i].size); in bam_tx_status()
1019 struct bam_async_desc *async_desc = NULL; in bam_start_dma() local
1039 async_desc = container_of(vd, struct bam_async_desc, vd); in bam_start_dma()
1043 bam_chan_init_hw(bchan, async_desc->dir); in bam_start_dma()
1047 bam_apply_new_config(bchan, async_desc->dir); in bam_start_dma()
1049 desc = async_desc->curr_desc; in bam_start_dma()
1053 if (async_desc->num_desc > avail) in bam_start_dma()
1054 async_desc->xfer_len = avail; in bam_start_dma()
1056 async_desc->xfer_len = async_desc->num_desc; in bam_start_dma()
1059 if (async_desc->num_desc == async_desc->xfer_len) in bam_start_dma()
1060 desc[async_desc->xfer_len - 1].flags |= in bam_start_dma()
1061 cpu_to_le16(async_desc->flags); in bam_start_dma()
1065 dmaengine_desc_get_callback(&async_desc->vd.tx, &cb); in bam_start_dma()
1075 if (((avail <= async_desc->xfer_len) || !vd || in bam_start_dma()
1077 !(async_desc->flags & DESC_FLAG_EOT)) in bam_start_dma()
1078 desc[async_desc->xfer_len - 1].flags |= in bam_start_dma()
1081 if (bchan->tail + async_desc->xfer_len > MAX_DESCRIPTORS) { in bam_start_dma()
1087 (async_desc->xfer_len - partial) * in bam_start_dma()
1091 async_desc->xfer_len * in bam_start_dma()
1095 bchan->tail += async_desc->xfer_len; in bam_start_dma()
1097 list_add_tail(&async_desc->desc_node, &bchan->desc_list); in bam_start_dma()
1161 struct bam_async_desc *async_desc = container_of(vd, in bam_dma_free_desc() local
1164 kfree(async_desc); in bam_dma_free_desc()