aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2017-01-03 06:22:34 -0500
committerTony Lindgren <tony@atomide.com>2017-01-06 11:46:06 -0500
commit657279778af54f35e54b07b6687918f254a2992c (patch)
tree99ba20f33c6fbb92d93d0346977d45590d9c19b0
parent6ca36a455e2730a3195a5596d53c900c9cd00838 (diff)
ARM: OMAP1: DMA: Correct the number of logical channels
OMAP1510, OMAP5910 and OMAP310 have only 9 logical channels. OMAP1610, OMAP5912, OMAP1710, OMAP730, and OMAP850 have 16 logical channels available. The wired 17 for the lch_count must have been used to cover the 16 + 1 dedicated LCD channel, in reality we can only use 9 or 16 channels. The d->chan_count is not used by the omap-dma stack, so we can skip the setup. chan_count was configured to the number of logical channels and not the actual number of physical channels anyways. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap1/dma.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index f6ba589cd312..c821c1d5610e 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -32,7 +32,6 @@
32#include "soc.h" 32#include "soc.h"
33 33
34#define OMAP1_DMA_BASE (0xfffed800) 34#define OMAP1_DMA_BASE (0xfffed800)
35#define OMAP1_LOGICAL_DMA_CH_COUNT 17
36 35
37static u32 enable_1510_mode; 36static u32 enable_1510_mode;
38 37
@@ -348,8 +347,6 @@ static int __init omap1_system_dma_init(void)
348 goto exit_iounmap; 347 goto exit_iounmap;
349 } 348 }
350 349
351 d->lch_count = OMAP1_LOGICAL_DMA_CH_COUNT;
352
353 /* Valid attributes for omap1 plus processors */ 350 /* Valid attributes for omap1 plus processors */
354 if (cpu_is_omap15xx()) 351 if (cpu_is_omap15xx())
355 d->dev_caps = ENABLE_1510_MODE; 352 d->dev_caps = ENABLE_1510_MODE;
@@ -366,13 +363,14 @@ static int __init omap1_system_dma_init(void)
366 d->dev_caps |= CLEAR_CSR_ON_READ; 363 d->dev_caps |= CLEAR_CSR_ON_READ;
367 d->dev_caps |= IS_WORD_16; 364 d->dev_caps |= IS_WORD_16;
368 365
369 if (cpu_is_omap15xx()) 366 /* available logical channels */
370 d->chan_count = 9; 367 if (cpu_is_omap15xx()) {
371 else if (cpu_is_omap16xx() || cpu_is_omap7xx()) { 368 d->lch_count = 9;
372 if (!(d->dev_caps & ENABLE_1510_MODE)) 369 } else {
373 d->chan_count = 16; 370 if (d->dev_caps & ENABLE_1510_MODE)
371 d->lch_count = 9;
374 else 372 else
375 d->chan_count = 9; 373 d->lch_count = 16;
376 } 374 }
377 375
378 p = dma_plat_info; 376 p = dma_plat_info;