diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-12 17:59:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-12 17:59:53 -0500 |
commit | 87c779baabff157f09db6fce417a7544220f9f00 (patch) | |
tree | 3a11ac4b554a3fe52d331f1f4f72997582e87cac /drivers/dma/xilinx/xilinx_vdma.c | |
parent | eea0cf3fcd3243666e0bb792c560ec128b1f06a1 (diff) | |
parent | a9507ca3fb90987db5c6cc385885782cb05d4967 (diff) |
Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine updates from Vinod Koul:
"Main features this time are:
- BAM v1.3.0 support form qcom bam dma
- support for Allwinner sun8i dma
- atmels eXtended DMA Controller driver
- chancnt cleanup by Maxime
- fixes spread over drivers"
* 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma: (56 commits)
dmaenegine: Delete a check before free_percpu()
dmaengine: ioatdma: fix dma mapping errors
dma: cppi41: add a delay while setting the TD bit
dma: cppi41: wait longer for the HW to return the descriptor
dmaengine: fsl-edma: fixup reg offset and hw S/G support in big-endian model
dmaengine: fsl-edma: fix calculation of remaining bytes
drivers/dma/pch_dma: declare pch_dma_id_table as static
dmaengine: ste_dma40: fix error return code
dma: imx-sdma: clarify about firmware not found error
Documentation: devicetree: Fix Xilinx VDMA specification
dmaengine: pl330: update author info
dmaengine: clarify the issue_pending expectations
dmaengine: at_xdmac: Add DMA_PRIVATE
ARM: dts: at_xdmac: fix bad value of dma-cells in documentation
dmaengine: at_xdmac: fix missing spin_unlock
dmaengine: at_xdmac: fix a bug in transfer residue computation
dmaengine: at_xdmac: fix software lockup at_xdmac_tx_status()
dmaengine: at_xdmac: remove chancnt affectation
dmaengine: at_xdmac: prefer usage of readl/writel_relaxed
dmaengine: xdmac: fix print warning on dma_addr_t variable
...
Diffstat (limited to 'drivers/dma/xilinx/xilinx_vdma.c')
-rw-r--r-- | drivers/dma/xilinx/xilinx_vdma.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/dma/xilinx/xilinx_vdma.c b/drivers/dma/xilinx/xilinx_vdma.c index a6e64767186e..4a3a8f3137b3 100644 --- a/drivers/dma/xilinx/xilinx_vdma.c +++ b/drivers/dma/xilinx/xilinx_vdma.c | |||
@@ -942,6 +942,9 @@ xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan, | |||
942 | if (!xt->numf || !xt->sgl[0].size) | 942 | if (!xt->numf || !xt->sgl[0].size) |
943 | return NULL; | 943 | return NULL; |
944 | 944 | ||
945 | if (xt->frame_size != 1) | ||
946 | return NULL; | ||
947 | |||
945 | /* Allocate a transaction descriptor. */ | 948 | /* Allocate a transaction descriptor. */ |
946 | desc = xilinx_vdma_alloc_tx_descriptor(chan); | 949 | desc = xilinx_vdma_alloc_tx_descriptor(chan); |
947 | if (!desc) | 950 | if (!desc) |
@@ -960,7 +963,7 @@ xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan, | |||
960 | hw = &segment->hw; | 963 | hw = &segment->hw; |
961 | hw->vsize = xt->numf; | 964 | hw->vsize = xt->numf; |
962 | hw->hsize = xt->sgl[0].size; | 965 | hw->hsize = xt->sgl[0].size; |
963 | hw->stride = xt->sgl[0].icg << | 966 | hw->stride = (xt->sgl[0].icg + xt->sgl[0].size) << |
964 | XILINX_VDMA_FRMDLY_STRIDE_STRIDE_SHIFT; | 967 | XILINX_VDMA_FRMDLY_STRIDE_STRIDE_SHIFT; |
965 | hw->stride |= chan->config.frm_dly << | 968 | hw->stride |= chan->config.frm_dly << |
966 | XILINX_VDMA_FRMDLY_STRIDE_FRMDLY_SHIFT; | 969 | XILINX_VDMA_FRMDLY_STRIDE_FRMDLY_SHIFT; |
@@ -971,9 +974,11 @@ xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan, | |||
971 | hw->buf_addr = xt->src_start; | 974 | hw->buf_addr = xt->src_start; |
972 | 975 | ||
973 | /* Link the previous next descriptor to current */ | 976 | /* Link the previous next descriptor to current */ |
974 | prev = list_last_entry(&desc->segments, | 977 | if (!list_empty(&desc->segments)) { |
975 | struct xilinx_vdma_tx_segment, node); | 978 | prev = list_last_entry(&desc->segments, |
976 | prev->hw.next_desc = segment->phys; | 979 | struct xilinx_vdma_tx_segment, node); |
980 | prev->hw.next_desc = segment->phys; | ||
981 | } | ||
977 | 982 | ||
978 | /* Insert the segment into the descriptor segments list. */ | 983 | /* Insert the segment into the descriptor segments list. */ |
979 | list_add_tail(&segment->node, &desc->segments); | 984 | list_add_tail(&segment->node, &desc->segments); |