Lines Matching refs:hw_desc
248 desc->hw_desc = kcalloc(num, sizeof(*desc->hw_desc), GFP_NOWAIT); in axi_desc_alloc()
249 if (!desc->hw_desc) { in axi_desc_alloc()
280 struct axi_dma_hw_desc *hw_desc; in axi_desc_put() local
284 hw_desc = &desc->hw_desc[descs_put]; in axi_desc_put()
285 dma_pool_free(chan->desc_pool, hw_desc->lli, hw_desc->llp); in axi_desc_put()
288 kfree(desc->hw_desc); in axi_desc_put()
325 len = vd_to_axi_desc(vdesc)->hw_desc[0].len; in dma_chan_tx_status()
420 write_chan_llp(chan, first->hw_desc[0].llp | lms); in axi_chan_block_xfer_start()
583 static void set_desc_dest_master(struct axi_dma_hw_desc *hw_desc, in set_desc_dest_master() argument
589 val = le32_to_cpu(hw_desc->lli->ctl_lo); in set_desc_dest_master()
595 hw_desc->lli->ctl_lo = cpu_to_le32(val); in set_desc_dest_master()
599 struct axi_dma_hw_desc *hw_desc, in dw_axi_dma_set_hw_desc() argument
648 hw_desc->lli = axi_desc_get(chan, &hw_desc->llp); in dw_axi_dma_set_hw_desc()
649 if (unlikely(!hw_desc->lli)) in dw_axi_dma_set_hw_desc()
661 hw_desc->lli->ctl_hi = cpu_to_le32(ctlhi); in dw_axi_dma_set_hw_desc()
664 write_desc_sar(hw_desc, mem_addr); in dw_axi_dma_set_hw_desc()
665 write_desc_dar(hw_desc, device_addr); in dw_axi_dma_set_hw_desc()
667 write_desc_sar(hw_desc, device_addr); in dw_axi_dma_set_hw_desc()
668 write_desc_dar(hw_desc, mem_addr); in dw_axi_dma_set_hw_desc()
671 hw_desc->lli->block_ts_lo = cpu_to_le32(block_ts - 1); in dw_axi_dma_set_hw_desc()
675 hw_desc->lli->ctl_lo = cpu_to_le32(ctllo); in dw_axi_dma_set_hw_desc()
677 set_desc_src_master(hw_desc); in dw_axi_dma_set_hw_desc()
679 hw_desc->len = len; in dw_axi_dma_set_hw_desc()
719 struct axi_dma_hw_desc *hw_desc = NULL; in dw_axi_dma_chan_prep_cyclic() local
753 hw_desc = &desc->hw_desc[i]; in dw_axi_dma_chan_prep_cyclic()
755 status = dw_axi_dma_set_hw_desc(chan, hw_desc, src_addr, in dw_axi_dma_chan_prep_cyclic()
760 desc->length += hw_desc->len; in dw_axi_dma_chan_prep_cyclic()
764 set_desc_last(hw_desc); in dw_axi_dma_chan_prep_cyclic()
769 llp = desc->hw_desc[0].llp; in dw_axi_dma_chan_prep_cyclic()
773 hw_desc = &desc->hw_desc[--total_segments]; in dw_axi_dma_chan_prep_cyclic()
774 write_desc_llp(hw_desc, llp | lms); in dw_axi_dma_chan_prep_cyclic()
775 llp = hw_desc->llp; in dw_axi_dma_chan_prep_cyclic()
796 struct axi_dma_hw_desc *hw_desc = NULL; in dw_axi_dma_chan_prep_slave_sg() local
837 hw_desc = &desc->hw_desc[loop++]; in dw_axi_dma_chan_prep_slave_sg()
838 status = dw_axi_dma_set_hw_desc(chan, hw_desc, mem, segment_len); in dw_axi_dma_chan_prep_slave_sg()
842 desc->length += hw_desc->len; in dw_axi_dma_chan_prep_slave_sg()
849 set_desc_last(&desc->hw_desc[num_sgs - 1]); in dw_axi_dma_chan_prep_slave_sg()
853 hw_desc = &desc->hw_desc[--num_sgs]; in dw_axi_dma_chan_prep_slave_sg()
854 write_desc_llp(hw_desc, llp | lms); in dw_axi_dma_chan_prep_slave_sg()
855 llp = hw_desc->llp; in dw_axi_dma_chan_prep_slave_sg()
875 struct axi_dma_hw_desc *hw_desc = NULL; in dma_chan_prep_dma_memcpy() local
897 hw_desc = &desc->hw_desc[num]; in dma_chan_prep_dma_memcpy()
916 hw_desc->lli = axi_desc_get(chan, &hw_desc->llp); in dma_chan_prep_dma_memcpy()
917 if (unlikely(!hw_desc->lli)) in dma_chan_prep_dma_memcpy()
920 write_desc_sar(hw_desc, src_adr); in dma_chan_prep_dma_memcpy()
921 write_desc_dar(hw_desc, dst_adr); in dma_chan_prep_dma_memcpy()
922 hw_desc->lli->block_ts_lo = cpu_to_le32(block_ts - 1); in dma_chan_prep_dma_memcpy()
933 hw_desc->lli->ctl_hi = cpu_to_le32(reg); in dma_chan_prep_dma_memcpy()
941 hw_desc->lli->ctl_lo = cpu_to_le32(reg); in dma_chan_prep_dma_memcpy()
943 set_desc_src_master(hw_desc); in dma_chan_prep_dma_memcpy()
944 set_desc_dest_master(hw_desc, desc); in dma_chan_prep_dma_memcpy()
946 hw_desc->len = xfer_len; in dma_chan_prep_dma_memcpy()
947 desc->length += hw_desc->len; in dma_chan_prep_dma_memcpy()
956 set_desc_last(&desc->hw_desc[num - 1]); in dma_chan_prep_dma_memcpy()
959 hw_desc = &desc->hw_desc[--num]; in dma_chan_prep_dma_memcpy()
960 write_desc_llp(hw_desc, llp | lms); in dma_chan_prep_dma_memcpy()
961 llp = hw_desc->llp; in dma_chan_prep_dma_memcpy()
1007 axi_chan_dump_lli(chan, &desc_head->hw_desc[i]); in axi_chan_list_dump_lli()
1047 struct axi_dma_hw_desc *hw_desc; in axi_chan_block_xfer_complete() local
1074 hw_desc = &desc->hw_desc[i]; in axi_chan_block_xfer_complete()
1075 if (hw_desc->llp == llp) { in axi_chan_block_xfer_complete()
1076 axi_chan_irq_clear(chan, hw_desc->lli->status_lo); in axi_chan_block_xfer_complete()
1077 hw_desc->lli->ctl_hi |= CH_CTL_H_LLI_VALID; in axi_chan_block_xfer_complete()
1080 if (((hw_desc->len * (i + 1)) % desc->period_len) == 0) in axi_chan_block_xfer_complete()