aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/edma.c
diff options
context:
space:
mode:
authorJoel Fernandes <joelf@ti.com>2013-09-23 19:05:15 -0400
committerVinod Koul <vinod.koul@intel.com>2013-10-21 03:25:29 -0400
commit2abd5f1b97fce6e197be01d67a9567c7793c80d3 (patch)
treebe4461d09afc0ed1dfe30a5484e8f75099334349 /drivers/dma/edma.c
parentfd009035047941fe21622b09665423f1043f0507 (diff)
dma: edma: Increase maximum SG limit to 20
davinci-pcm uses 16 as the no.of periods. With this, in EDMA we have to allocate atleast 17 slots: 1 slot for channel, and 16 slots the periods. Due to this, the MAX_NR_SG limitation causes problems, set it to 20 to make cyclic DMA work when davinci-pcm is converted to use DMA Engine. Also add a comment clarifying this. Signed-off-by: Joel Fernandes <joelf@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/edma.c')
-rw-r--r--drivers/dma/edma.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index e47e3c9e37b2..79b046b3e2f0 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -46,8 +46,14 @@
46#define EDMA_CHANS 64 46#define EDMA_CHANS 64
47#endif /* CONFIG_ARCH_DAVINCI_DA8XX */ 47#endif /* CONFIG_ARCH_DAVINCI_DA8XX */
48 48
49/* Max of 16 segments per channel to conserve PaRAM slots */ 49/*
50#define MAX_NR_SG 16 50 * Max of 20 segments per channel to conserve PaRAM slots
51 * Also note that MAX_NR_SG should be atleast the no.of periods
52 * that are required for ASoC, otherwise DMA prep calls will
53 * fail. Today davinci-pcm is the only user of this driver and
54 * requires atleast 17 slots, so we setup the default to 20.
55 */
56#define MAX_NR_SG 20
51#define EDMA_MAX_SLOTS MAX_NR_SG 57#define EDMA_MAX_SLOTS MAX_NR_SG
52#define EDMA_DESCRIPTORS 16 58#define EDMA_DESCRIPTORS 16
53 59