Commit 341ce712 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Vinod Koul

dmaengine: omap-dma: Use defines for dma channels and request count

Instead of magic numbers in the code, use define for number of logical DMA
channels and DMA requests.
Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 73f67d35
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
#include "virt-dma.h" #include "virt-dma.h"
#define OMAP_SDMA_REQUESTS 127
#define OMAP_SDMA_CHANNELS 32
struct omap_dmadev { struct omap_dmadev {
struct dma_device ddev; struct dma_device ddev;
spinlock_t lock; spinlock_t lock;
...@@ -33,7 +36,7 @@ struct omap_dmadev { ...@@ -33,7 +36,7 @@ struct omap_dmadev {
bool legacy; bool legacy;
spinlock_t irq_lock; spinlock_t irq_lock;
uint32_t irq_enable_mask; uint32_t irq_enable_mask;
struct omap_chan *lch_map[32]; struct omap_chan *lch_map[OMAP_SDMA_CHANNELS];
}; };
struct omap_chan { struct omap_chan {
...@@ -1116,7 +1119,7 @@ static int omap_dma_probe(struct platform_device *pdev) ...@@ -1116,7 +1119,7 @@ static int omap_dma_probe(struct platform_device *pdev)
tasklet_init(&od->task, omap_dma_sched, (unsigned long)od); tasklet_init(&od->task, omap_dma_sched, (unsigned long)od);
for (i = 0; i < 127; i++) { for (i = 0; i < OMAP_SDMA_REQUESTS; i++) {
rc = omap_dma_chan_init(od, i); rc = omap_dma_chan_init(od, i);
if (rc) { if (rc) {
omap_dma_free(od); omap_dma_free(od);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment