dma40: implement prep_memcpy as a wrapper around memcpy_sg
[deliverable/linux.git] / drivers / dma / ste_dma40_ll.c
index 0b096a38322dd39d74e26df6c31cfc6cc9aed848..552c5972c75ed06a75681174f34a5dfe12911471 100644 (file)
@@ -198,7 +198,7 @@ static int d40_seg_size(int size, int data_width1, int data_width2)
        return seg_max;
 }
 
-struct d40_phy_lli *d40_phy_buf_to_lli(struct d40_phy_lli *lli,
+static struct d40_phy_lli *d40_phy_buf_to_lli(struct d40_phy_lli *lli,
                                       dma_addr_t addr,
                                       u32 size,
                                       int psize,
@@ -272,7 +272,7 @@ int d40_phy_sg_to_lli(struct scatterlist *sg,
                if (target)
                        dst = target;
                else
-                       dst = sg_phys(current_sg);
+                       dst = sg_dma_address(current_sg);
 
                l_phys = ALIGN(lli_phys + (lli - lli_sg) *
                               sizeof(struct d40_phy_lli), D40_LLI_ALIGN);
@@ -416,7 +416,7 @@ int d40_log_sg_to_dev(struct scatterlist *sg,
                if (direction == DMA_TO_DEVICE) {
                        lli_src =
                                d40_log_buf_to_lli(lli_src,
-                                                  sg_phys(current_sg),
+                                                  sg_dma_address(current_sg),
                                                   sg_dma_len(current_sg),
                                                   lcsp->lcsp1, src_data_width,
                                                   dst_data_width,
@@ -431,7 +431,7 @@ int d40_log_sg_to_dev(struct scatterlist *sg,
                } else {
                        lli_dst =
                                d40_log_buf_to_lli(lli_dst,
-                                                  sg_phys(current_sg),
+                                                  sg_dma_address(current_sg),
                                                   sg_dma_len(current_sg),
                                                   lcsp->lcsp3, dst_data_width,
                                                   src_data_width,
@@ -491,7 +491,7 @@ int d40_log_sg_to_lli(struct scatterlist *sg,
        for_each_sg(sg, current_sg, sg_len, i) {
                total_size += sg_dma_len(current_sg);
                lli = d40_log_buf_to_lli(lli,
-                                        sg_phys(current_sg),
+                                        sg_dma_address(current_sg),
                                         sg_dma_len(current_sg),
                                         lcsp13,
                                         data_width1, data_width2, true);
This page took 0.024505 seconds and 5 git commands to generate.