Lines Matching refs:sgl

37 		struct hisi_acc_hw_sgl *sgl;  member
92 block[i].sgl = dma_alloc_coherent(dev, block_size, in hisi_acc_create_sgl_pool()
95 if (!block[i].sgl) { in hisi_acc_create_sgl_pool()
104 block[i].sgl = dma_alloc_coherent(dev, remain_sgl * sgl_size, in hisi_acc_create_sgl_pool()
107 if (!block[i].sgl) { in hisi_acc_create_sgl_pool()
125 dma_free_coherent(dev, block_size, block[j].sgl, in hisi_acc_create_sgl_pool()
151 dma_free_coherent(dev, block[i].size, block[i].sgl, in hisi_acc_free_sgl_pool()
172 return (void *)block[block_index].sgl + pool->sgl_size * offset; in acc_get_sgl()
175 static void sg_map_to_hw_sg(struct scatterlist *sgl, in sg_map_to_hw_sg() argument
178 hw_sge->buf = sg_dma_address(sgl); in sg_map_to_hw_sg()
179 hw_sge->len = cpu_to_le32(sg_dma_len(sgl)); in sg_map_to_hw_sg()
180 hw_sge->page_ctrl = sg_virt(sgl); in sg_map_to_hw_sg()
221 struct scatterlist *sgl, in hisi_acc_sg_buf_map_to_hw_sgl() argument
231 if (!dev || !sgl || !pool || !hw_sgl_dma) in hisi_acc_sg_buf_map_to_hw_sgl()
234 sg_n = sg_nents(sgl); in hisi_acc_sg_buf_map_to_hw_sgl()
236 sg_n_mapped = dma_map_sg(dev, sgl, sg_n, DMA_BIDIRECTIONAL); in hisi_acc_sg_buf_map_to_hw_sgl()
250 dma_unmap_sg(dev, sgl, sg_n, DMA_BIDIRECTIONAL); in hisi_acc_sg_buf_map_to_hw_sgl()
256 for_each_sg(sgl, sg, sg_n_mapped, i) { in hisi_acc_sg_buf_map_to_hw_sgl()
277 void hisi_acc_sg_buf_unmap(struct device *dev, struct scatterlist *sgl, in hisi_acc_sg_buf_unmap() argument
280 if (!dev || !sgl || !hw_sgl) in hisi_acc_sg_buf_unmap()
283 dma_unmap_sg(dev, sgl, sg_nents(sgl), DMA_BIDIRECTIONAL); in hisi_acc_sg_buf_unmap()