Skip to content

Commit

Permalink
dmaengine: pl330: Limit MFIFO usage for memcpy to avoid exhausting en…
Browse files Browse the repository at this point in the history
…tries

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>
  • Loading branch information
Jon Medhurst authored and Vinod Koul committed Nov 17, 2014
1 parent 137bd11 commit c27f955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/pl330.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit c27f955

Please sign in to comment.