diff options
Diffstat (limited to 'drivers/dma/imx-dma.c')
-rw-r--r-- | drivers/dma/imx-dma.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index bb787d8e1529..fcfeb3cd8d31 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c | |||
@@ -227,7 +227,7 @@ static inline int imxdma_sg_next(struct imxdma_desc *d) | |||
227 | struct scatterlist *sg = d->sg; | 227 | struct scatterlist *sg = d->sg; |
228 | unsigned long now; | 228 | unsigned long now; |
229 | 229 | ||
230 | now = min(d->len, sg->length); | 230 | now = min(d->len, sg_dma_len(sg)); |
231 | if (d->len != IMX_DMA_LENGTH_LOOP) | 231 | if (d->len != IMX_DMA_LENGTH_LOOP) |
232 | d->len -= now; | 232 | d->len -= now; |
233 | 233 | ||
@@ -763,16 +763,16 @@ static struct dma_async_tx_descriptor *imxdma_prep_slave_sg( | |||
763 | desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node); | 763 | desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node); |
764 | 764 | ||
765 | for_each_sg(sgl, sg, sg_len, i) { | 765 | for_each_sg(sgl, sg, sg_len, i) { |
766 | dma_length += sg->length; | 766 | dma_length += sg_dma_len(sg); |
767 | } | 767 | } |
768 | 768 | ||
769 | switch (imxdmac->word_size) { | 769 | switch (imxdmac->word_size) { |
770 | case DMA_SLAVE_BUSWIDTH_4_BYTES: | 770 | case DMA_SLAVE_BUSWIDTH_4_BYTES: |
771 | if (sgl->length & 3 || sgl->dma_address & 3) | 771 | if (sg_dma_len(sgl) & 3 || sgl->dma_address & 3) |
772 | return NULL; | 772 | return NULL; |
773 | break; | 773 | break; |
774 | case DMA_SLAVE_BUSWIDTH_2_BYTES: | 774 | case DMA_SLAVE_BUSWIDTH_2_BYTES: |
775 | if (sgl->length & 1 || sgl->dma_address & 1) | 775 | if (sg_dma_len(sgl) & 1 || sgl->dma_address & 1) |
776 | return NULL; | 776 | return NULL; |
777 | break; | 777 | break; |
778 | case DMA_SLAVE_BUSWIDTH_1_BYTE: | 778 | case DMA_SLAVE_BUSWIDTH_1_BYTE: |
@@ -831,13 +831,13 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic( | |||
831 | imxdmac->sg_list[i].page_link = 0; | 831 | imxdmac->sg_list[i].page_link = 0; |
832 | imxdmac->sg_list[i].offset = 0; | 832 | imxdmac->sg_list[i].offset = 0; |
833 | imxdmac->sg_list[i].dma_address = dma_addr; | 833 | imxdmac->sg_list[i].dma_address = dma_addr; |
834 | imxdmac->sg_list[i].length = period_len; | 834 | sg_dma_len(&imxdmac->sg_list[i]) = period_len; |
835 | dma_addr += period_len; | 835 | dma_addr += period_len; |
836 | } | 836 | } |
837 | 837 | ||
838 | /* close the loop */ | 838 | /* close the loop */ |
839 | imxdmac->sg_list[periods].offset = 0; | 839 | imxdmac->sg_list[periods].offset = 0; |
840 | imxdmac->sg_list[periods].length = 0; | 840 | sg_dma_len(&imxdmac->sg_list[periods]) = 0; |
841 | imxdmac->sg_list[periods].page_link = | 841 | imxdmac->sg_list[periods].page_link = |
842 | ((unsigned long)imxdmac->sg_list | 0x01) & ~0x02; | 842 | ((unsigned long)imxdmac->sg_list | 0x01) & ~0x02; |
843 | 843 | ||