Lines Matching refs:async_desc

352 	struct adm_async_desc *async_desc;  in adm_prep_slave_sg()  local
402 async_desc = kzalloc(sizeof(*async_desc), GFP_NOWAIT); in adm_prep_slave_sg()
403 if (!async_desc) in adm_prep_slave_sg()
407 async_desc->mux = achan->slave.slave_id & ADM_CRCI_MUX_SEL ? in adm_prep_slave_sg()
409 async_desc->crci = crci; in adm_prep_slave_sg()
410 async_desc->blk_size = blk_size; in adm_prep_slave_sg()
411 async_desc->dma_len = single_count * sizeof(struct adm_desc_hw_single) + in adm_prep_slave_sg()
415 async_desc->cpl = kzalloc(async_desc->dma_len, GFP_NOWAIT); in adm_prep_slave_sg()
416 if (!async_desc->cpl) in adm_prep_slave_sg()
419 async_desc->adev = adev; in adm_prep_slave_sg()
422 cple = PTR_ALIGN(async_desc->cpl, ADM_DESC_ALIGN); in adm_prep_slave_sg()
426 async_desc->length += sg_dma_len(sg); in adm_prep_slave_sg()
436 async_desc->dma_addr = dma_map_single(adev->dev, async_desc->cpl, in adm_prep_slave_sg()
437 async_desc->dma_len, in adm_prep_slave_sg()
439 if (dma_mapping_error(adev->dev, async_desc->dma_addr)) in adm_prep_slave_sg()
442 cple_addr = async_desc->dma_addr + ((void *)cple - async_desc->cpl); in adm_prep_slave_sg()
448 *cple |= (async_desc->dma_addr + ADM_DESC_ALIGN) >> 3; in adm_prep_slave_sg()
452 return vchan_tx_prep(&achan->vc, &async_desc->vd, flags); in adm_prep_slave_sg()
455 kfree(async_desc); in adm_prep_slave_sg()
508 struct adm_async_desc *async_desc; in adm_start_dma() local
518 async_desc = container_of(vd, struct adm_async_desc, vd); in adm_start_dma()
519 achan->curr_txd = async_desc; in adm_start_dma()
539 if (async_desc->crci) { in adm_start_dma()
540 writel(async_desc->mux | async_desc->blk_size, in adm_start_dma()
541 adev->regs + ADM_CRCI_CTL(async_desc->crci, adev->ee)); in adm_start_dma()
548 writel(ALIGN(async_desc->dma_addr, ADM_DESC_ALIGN) >> 3, in adm_start_dma()
563 struct adm_async_desc *async_desc; in adm_dma_irq() local
593 async_desc = achan->curr_txd; in adm_dma_irq()
597 if (async_desc) { in adm_dma_irq()
598 vchan_cookie_complete(&async_desc->vd); in adm_dma_irq()
678 struct adm_async_desc *async_desc = container_of(vd, in adm_dma_free_desc() local
681 dma_unmap_single(async_desc->adev->dev, async_desc->dma_addr, in adm_dma_free_desc()
682 async_desc->dma_len, DMA_TO_DEVICE); in adm_dma_free_desc()
683 kfree(async_desc->cpl); in adm_dma_free_desc()
684 kfree(async_desc); in adm_dma_free_desc()