Lines Matching refs:desc
195 void __iomem *desc; member
212 struct msgdma_sw_desc *desc; in msgdma_get_descriptor() local
216 desc = list_first_entry(&mdev->free_list, struct msgdma_sw_desc, node); in msgdma_get_descriptor()
217 list_del(&desc->node); in msgdma_get_descriptor()
220 INIT_LIST_HEAD(&desc->tx_list); in msgdma_get_descriptor()
222 return desc; in msgdma_get_descriptor()
231 struct msgdma_sw_desc *desc) in msgdma_free_descriptor() argument
236 list_move_tail(&desc->node, &mdev->free_list); in msgdma_free_descriptor()
237 list_for_each_entry_safe(child, next, &desc->tx_list, node) { in msgdma_free_descriptor()
251 struct msgdma_sw_desc *desc, *next; in msgdma_free_desc_list() local
253 list_for_each_entry_safe(desc, next, list, node) in msgdma_free_desc_list()
254 msgdma_free_descriptor(mdev, desc); in msgdma_free_desc_list()
265 static void msgdma_desc_config(struct msgdma_extended_desc *desc, in msgdma_desc_config() argument
270 desc->read_addr_lo = lower_32_bits(src); in msgdma_desc_config()
271 desc->write_addr_lo = lower_32_bits(dst); in msgdma_desc_config()
274 desc->read_addr_hi = upper_32_bits(src); in msgdma_desc_config()
275 desc->write_addr_hi = upper_32_bits(dst); in msgdma_desc_config()
277 desc->len = len; in msgdma_desc_config()
278 desc->stride = stride; in msgdma_desc_config()
279 desc->burst_seq_num = 0; /* 0 will result in max burst length */ in msgdma_desc_config()
285 desc->control = MSGDMA_DESC_CTL_TR_ERR_IRQ | MSGDMA_DESC_CTL_GO | in msgdma_desc_config()
293 static void msgdma_desc_config_eod(struct msgdma_extended_desc *desc) in msgdma_desc_config_eod() argument
295 desc->control |= MSGDMA_DESC_CTL_TR_COMP_IRQ; in msgdma_desc_config_eod()
337 struct msgdma_extended_desc *desc; in msgdma_prep_memcpy() local
358 desc = &new->hw_desc; in msgdma_prep_memcpy()
359 msgdma_desc_config(desc, dma_dst, dma_src, copy, in msgdma_prep_memcpy()
370 msgdma_desc_config_eod(desc); in msgdma_prep_memcpy()
396 void *desc = NULL; in msgdma_prep_slave_sg() local
423 desc = &new->hw_desc; in msgdma_prep_slave_sg()
435 msgdma_desc_config(desc, dma_dst, dma_src, len, stride); in msgdma_prep_slave_sg()
455 msgdma_desc_config_eod(desc); in msgdma_prep_slave_sg()
497 struct msgdma_sw_desc *desc) in msgdma_copy_one() argument
499 void __iomem *hw_desc = mdev->desc; in msgdma_copy_one()
518 memcpy((void __force *)hw_desc, &desc->hw_desc, in msgdma_copy_one()
519 sizeof(desc->hw_desc) - sizeof(u32)); in msgdma_copy_one()
524 iowrite32(desc->hw_desc.control, hw_desc + in msgdma_copy_one()
535 struct msgdma_sw_desc *desc) in msgdma_copy_desc_to_fifo() argument
539 msgdma_copy_one(mdev, desc); in msgdma_copy_desc_to_fifo()
541 list_for_each_entry_safe(sdesc, next, &desc->tx_list, node) in msgdma_copy_desc_to_fifo()
551 struct msgdma_sw_desc *desc; in msgdma_start_transfer() local
556 desc = list_first_entry_or_null(&mdev->pending_list, in msgdma_start_transfer()
558 if (!desc) in msgdma_start_transfer()
562 msgdma_copy_desc_to_fifo(mdev, desc); in msgdma_start_transfer()
585 struct msgdma_sw_desc *desc, *next; in msgdma_chan_desc_cleanup() local
588 list_for_each_entry_safe(desc, next, &mdev->done_list, node) { in msgdma_chan_desc_cleanup()
591 dmaengine_desc_get_callback(&desc->async_tx, &cb); in msgdma_chan_desc_cleanup()
599 msgdma_free_descriptor(mdev, desc); in msgdma_chan_desc_cleanup()
609 struct msgdma_sw_desc *desc; in msgdma_complete_descriptor() local
611 desc = list_first_entry_or_null(&mdev->active_list, in msgdma_complete_descriptor()
613 if (!desc) in msgdma_complete_descriptor()
615 list_del(&desc->node); in msgdma_complete_descriptor()
616 dma_cookie_complete(&desc->async_tx); in msgdma_complete_descriptor()
617 list_add_tail(&desc->node, &mdev->done_list); in msgdma_complete_descriptor()
655 struct msgdma_sw_desc *desc; in msgdma_alloc_chan_resources() local
658 mdev->sw_desq = kcalloc(MSGDMA_DESC_NUM, sizeof(*desc), GFP_NOWAIT); in msgdma_alloc_chan_resources()
668 desc = mdev->sw_desq + i; in msgdma_alloc_chan_resources()
669 dma_async_tx_descriptor_init(&desc->async_tx, &mdev->dmachan); in msgdma_alloc_chan_resources()
670 desc->async_tx.tx_submit = msgdma_tx_submit; in msgdma_alloc_chan_resources()
671 list_add_tail(&desc->node, &mdev->free_list); in msgdma_alloc_chan_resources()
825 ret = request_and_map(pdev, "desc", &dma_res, &mdev->desc, false); in msgdma_probe()