Lines Matching refs:segment

669 	struct xilinx_vdma_tx_segment *segment;  in xilinx_vdma_alloc_tx_segment()  local
672 segment = dma_pool_zalloc(chan->desc_pool, GFP_ATOMIC, &phys); in xilinx_vdma_alloc_tx_segment()
673 if (!segment) in xilinx_vdma_alloc_tx_segment()
676 segment->phys = phys; in xilinx_vdma_alloc_tx_segment()
678 return segment; in xilinx_vdma_alloc_tx_segment()
690 struct xilinx_cdma_tx_segment *segment; in xilinx_cdma_alloc_tx_segment() local
693 segment = dma_pool_zalloc(chan->desc_pool, GFP_ATOMIC, &phys); in xilinx_cdma_alloc_tx_segment()
694 if (!segment) in xilinx_cdma_alloc_tx_segment()
697 segment->phys = phys; in xilinx_cdma_alloc_tx_segment()
699 return segment; in xilinx_cdma_alloc_tx_segment()
711 struct xilinx_axidma_tx_segment *segment = NULL; in xilinx_axidma_alloc_tx_segment() local
716 segment = list_first_entry(&chan->free_seg_list, in xilinx_axidma_alloc_tx_segment()
719 list_del(&segment->node); in xilinx_axidma_alloc_tx_segment()
723 if (!segment) in xilinx_axidma_alloc_tx_segment()
726 return segment; in xilinx_axidma_alloc_tx_segment()
738 struct xilinx_aximcdma_tx_segment *segment = NULL; in xilinx_aximcdma_alloc_tx_segment() local
743 segment = list_first_entry(&chan->free_seg_list, in xilinx_aximcdma_alloc_tx_segment()
746 list_del(&segment->node); in xilinx_aximcdma_alloc_tx_segment()
750 return segment; in xilinx_aximcdma_alloc_tx_segment()
781 struct xilinx_axidma_tx_segment *segment) in xilinx_dma_free_tx_segment() argument
783 xilinx_dma_clean_hw_desc(&segment->hw); in xilinx_dma_free_tx_segment()
785 list_add_tail(&segment->node, &chan->free_seg_list); in xilinx_dma_free_tx_segment()
795 segment) in xilinx_mcdma_free_tx_segment()
797 xilinx_mcdma_clean_hw_desc(&segment->hw); in xilinx_mcdma_free_tx_segment()
799 list_add_tail(&segment->node, &chan->free_seg_list); in xilinx_mcdma_free_tx_segment()
808 struct xilinx_cdma_tx_segment *segment) in xilinx_cdma_free_tx_segment() argument
810 dma_pool_free(chan->desc_pool, segment, segment->phys); in xilinx_cdma_free_tx_segment()
819 struct xilinx_vdma_tx_segment *segment) in xilinx_vdma_free_tx_segment() argument
821 dma_pool_free(chan->desc_pool, segment, segment->phys); in xilinx_vdma_free_tx_segment()
853 struct xilinx_vdma_tx_segment *segment, *next; in xilinx_dma_free_tx_descriptor() local
862 list_for_each_entry_safe(segment, next, &desc->segments, node) { in xilinx_dma_free_tx_descriptor()
863 list_del(&segment->node); in xilinx_dma_free_tx_descriptor()
864 xilinx_vdma_free_tx_segment(chan, segment); in xilinx_dma_free_tx_descriptor()
1365 struct xilinx_vdma_tx_segment *segment, *last = NULL; in xilinx_vdma_start_transfer() local
1426 list_for_each_entry(segment, &desc->segments, node) { in xilinx_vdma_start_transfer()
1430 segment->hw.buf_addr, in xilinx_vdma_start_transfer()
1431 segment->hw.buf_addr_msb); in xilinx_vdma_start_transfer()
1435 segment->hw.buf_addr); in xilinx_vdma_start_transfer()
1437 last = segment; in xilinx_vdma_start_transfer()
1506 struct xilinx_cdma_tx_segment *segment; in xilinx_cdma_start_transfer() local
1509 segment = list_first_entry(&head_desc->segments, in xilinx_cdma_start_transfer()
1513 hw = &segment->hw; in xilinx_cdma_start_transfer()
1586 struct xilinx_axidma_tx_segment *segment; in xilinx_dma_start_transfer() local
1589 segment = list_first_entry(&head_desc->segments, in xilinx_dma_start_transfer()
1592 hw = &segment->hw; in xilinx_dma_start_transfer()
2044 struct xilinx_vdma_tx_segment *segment; in xilinx_vdma_dma_prep_interleaved() local
2066 segment = xilinx_vdma_alloc_tx_segment(chan); in xilinx_vdma_dma_prep_interleaved()
2067 if (!segment) in xilinx_vdma_dma_prep_interleaved()
2071 hw = &segment->hw; in xilinx_vdma_dma_prep_interleaved()
2096 list_add_tail(&segment->node, &desc->segments); in xilinx_vdma_dma_prep_interleaved()
2099 segment = list_first_entry(&desc->segments, in xilinx_vdma_dma_prep_interleaved()
2101 desc->async_tx.phys = segment->phys; in xilinx_vdma_dma_prep_interleaved()
2126 struct xilinx_cdma_tx_segment *segment; in xilinx_cdma_prep_memcpy() local
2140 segment = xilinx_cdma_alloc_tx_segment(chan); in xilinx_cdma_prep_memcpy()
2141 if (!segment) in xilinx_cdma_prep_memcpy()
2144 hw = &segment->hw; in xilinx_cdma_prep_memcpy()
2154 list_add_tail(&segment->node, &desc->segments); in xilinx_cdma_prep_memcpy()
2156 desc->async_tx.phys = segment->phys; in xilinx_cdma_prep_memcpy()
2157 hw->next_desc = segment->phys; in xilinx_cdma_prep_memcpy()
2184 struct xilinx_axidma_tx_segment *segment = NULL; in xilinx_dma_prep_slave_sg() local
2211 segment = xilinx_axidma_alloc_tx_segment(chan); in xilinx_dma_prep_slave_sg()
2212 if (!segment) in xilinx_dma_prep_slave_sg()
2221 hw = &segment->hw; in xilinx_dma_prep_slave_sg()
2241 list_add_tail(&segment->node, &desc->segments); in xilinx_dma_prep_slave_sg()
2245 segment = list_first_entry(&desc->segments, in xilinx_dma_prep_slave_sg()
2247 desc->async_tx.phys = segment->phys; in xilinx_dma_prep_slave_sg()
2251 segment->hw.control |= XILINX_DMA_BD_SOP; in xilinx_dma_prep_slave_sg()
2252 segment = list_last_entry(&desc->segments, in xilinx_dma_prep_slave_sg()
2255 segment->hw.control |= XILINX_DMA_BD_EOP; in xilinx_dma_prep_slave_sg()
2286 struct xilinx_axidma_tx_segment *segment, *head_segment, *prev = NULL; in xilinx_dma_prep_dma_cyclic() local
2319 segment = xilinx_axidma_alloc_tx_segment(chan); in xilinx_dma_prep_dma_cyclic()
2320 if (!segment) in xilinx_dma_prep_dma_cyclic()
2329 hw = &segment->hw; in xilinx_dma_prep_dma_cyclic()
2335 prev->hw.next_desc = segment->phys; in xilinx_dma_prep_dma_cyclic()
2337 prev = segment; in xilinx_dma_prep_dma_cyclic()
2344 list_add_tail(&segment->node, &desc->segments); in xilinx_dma_prep_dma_cyclic()
2357 segment = list_last_entry(&desc->segments, in xilinx_dma_prep_dma_cyclic()
2360 segment->hw.next_desc = (u32) head_segment->phys; in xilinx_dma_prep_dma_cyclic()
2365 segment->hw.control |= XILINX_DMA_BD_EOP; in xilinx_dma_prep_dma_cyclic()
2394 struct xilinx_aximcdma_tx_segment *segment = NULL; in xilinx_mcdma_prep_slave_sg() local
2421 segment = xilinx_aximcdma_alloc_tx_segment(chan); in xilinx_mcdma_prep_slave_sg()
2422 if (!segment) in xilinx_mcdma_prep_slave_sg()
2431 hw = &segment->hw; in xilinx_mcdma_prep_slave_sg()
2448 list_add_tail(&segment->node, &desc->segments); in xilinx_mcdma_prep_slave_sg()
2452 segment = list_first_entry(&desc->segments, in xilinx_mcdma_prep_slave_sg()
2454 desc->async_tx.phys = segment->phys; in xilinx_mcdma_prep_slave_sg()
2458 segment->hw.control |= XILINX_MCDMA_BD_SOP; in xilinx_mcdma_prep_slave_sg()
2459 segment = list_last_entry(&desc->segments, in xilinx_mcdma_prep_slave_sg()
2462 segment->hw.control |= XILINX_MCDMA_BD_EOP; in xilinx_mcdma_prep_slave_sg()