aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/pl330.c
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2014-11-07 18:05:18 +0000
committerVinod Koul <vinod.koul@intel.com>2014-11-17 13:01:20 +0530
commitc27f95568d1ed2573fc9c8848d741da63ca9a34e (patch)
tree6ef10fba0dd31fc5b14dec0eed88d73a9f4f9994 /drivers/dma/pl330.c
parentdmaengine: pl330: Align DMA memcpy operations to MFIFO width (diff)
downloadlinux-dev-c27f95568d1ed2573fc9c8848d741da63ca9a34e.tar.xz
linux-dev-c27f95568d1ed2573fc9c8848d741da63ca9a34e.zip
dmaengine: pl330: Limit MFIFO usage for memcpy to avoid exhausting entries
The MFIFO is shared by all channels so restrict each memcpy to it's fair share. This is being over cautious, but without a global view of DMA channel usage on a system it's not possible to come up with a more optimum safe limit. Signed-off-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r--drivers/dma/pl330.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 81505420bde4..e13b51a46502 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2336,7 +2336,7 @@ static inline int get_burst_len(struct dma_pl330_desc *desc, size_t len)
int burst_len;
burst_len = pl330->pcfg.data_bus_width / 8;
- burst_len *= pl330->pcfg.data_buf_dep;
+ burst_len *= pl330->pcfg.data_buf_dep / pl330->pcfg.num_chan;
burst_len >>= desc->rqcfg.brst_size;
/* src/dst_burst_len can't be more than 16 */