Lines Matching refs:sgl

36 		struct hisi_acc_hw_sgl *sgl;  member
85 block[i].sgl = dma_alloc_coherent(dev, block_size, in hisi_acc_create_sgl_pool()
88 if (!block[i].sgl) in hisi_acc_create_sgl_pool()
95 block[i].sgl = dma_alloc_coherent(dev, remain_sgl * sgl_size, in hisi_acc_create_sgl_pool()
98 if (!block[i].sgl) in hisi_acc_create_sgl_pool()
114 dma_free_coherent(dev, block_size, block[j].sgl, in hisi_acc_create_sgl_pool()
141 dma_free_coherent(dev, block[i].size, block[i].sgl, in hisi_acc_free_sgl_pool()
162 return (void *)block[block_index].sgl + pool->sgl_size * offset; in acc_get_sgl()
165 static void sg_map_to_hw_sg(struct scatterlist *sgl, in sg_map_to_hw_sg() argument
168 hw_sge->buf = sg_dma_address(sgl); in sg_map_to_hw_sg()
169 hw_sge->len = cpu_to_le32(sg_dma_len(sgl)); in sg_map_to_hw_sg()
198 struct scatterlist *sgl, in hisi_acc_sg_buf_map_to_hw_sgl() argument
208 if (!dev || !sgl || !pool || !hw_sgl_dma) in hisi_acc_sg_buf_map_to_hw_sgl()
211 sg_n = sg_nents(sgl); in hisi_acc_sg_buf_map_to_hw_sgl()
213 sg_n_mapped = dma_map_sg(dev, sgl, sg_n, DMA_BIDIRECTIONAL); in hisi_acc_sg_buf_map_to_hw_sgl()
218 dma_unmap_sg(dev, sgl, sg_n, DMA_BIDIRECTIONAL); in hisi_acc_sg_buf_map_to_hw_sgl()
224 dma_unmap_sg(dev, sgl, sg_n, DMA_BIDIRECTIONAL); in hisi_acc_sg_buf_map_to_hw_sgl()
231 for_each_sg(sgl, sg, sg_n_mapped, i) { in hisi_acc_sg_buf_map_to_hw_sgl()
254 void hisi_acc_sg_buf_unmap(struct device *dev, struct scatterlist *sgl, in hisi_acc_sg_buf_unmap() argument
257 if (!dev || !sgl || !hw_sgl) in hisi_acc_sg_buf_unmap()
260 dma_unmap_sg(dev, sgl, sg_nents(sgl), DMA_BIDIRECTIONAL); in hisi_acc_sg_buf_unmap()