diff options
-rw-r--r-- | arch/arm/plat-omap/dma.c | 13 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/mach/dma.h | 15 |
2 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index def14ec265b3..7677a4a1cef2 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -2457,6 +2457,19 @@ static int __init omap_init_dma(void) | |||
2457 | setup_irq(irq, &omap24xx_dma_irq); | 2457 | setup_irq(irq, &omap24xx_dma_irq); |
2458 | } | 2458 | } |
2459 | 2459 | ||
2460 | /* Enable smartidle idlemodes and autoidle */ | ||
2461 | if (cpu_is_omap34xx()) { | ||
2462 | u32 v = dma_read(OCP_SYSCONFIG); | ||
2463 | v &= ~(DMA_SYSCONFIG_MIDLEMODE_MASK | | ||
2464 | DMA_SYSCONFIG_SIDLEMODE_MASK | | ||
2465 | DMA_SYSCONFIG_AUTOIDLE); | ||
2466 | v |= (DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | | ||
2467 | DMA_SYSCONFIG_SIDLEMODE(DMA_IDLEMODE_SMARTIDLE) | | ||
2468 | DMA_SYSCONFIG_AUTOIDLE); | ||
2469 | dma_write(v , OCP_SYSCONFIG); | ||
2470 | } | ||
2471 | |||
2472 | |||
2460 | /* FIXME: Update LCD DMA to work on 24xx */ | 2473 | /* FIXME: Update LCD DMA to work on 24xx */ |
2461 | if (cpu_class_is_omap1()) { | 2474 | if (cpu_class_is_omap1()) { |
2462 | r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0, | 2475 | r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0, |
diff --git a/arch/arm/plat-omap/include/mach/dma.h b/arch/arm/plat-omap/include/mach/dma.h index 8c1eae88737e..7b939cc01962 100644 --- a/arch/arm/plat-omap/include/mach/dma.h +++ b/arch/arm/plat-omap/include/mach/dma.h | |||
@@ -389,6 +389,21 @@ | |||
389 | #define DMA_THREAD_FIFO_25 (0x02 << 14) | 389 | #define DMA_THREAD_FIFO_25 (0x02 << 14) |
390 | #define DMA_THREAD_FIFO_50 (0x03 << 14) | 390 | #define DMA_THREAD_FIFO_50 (0x03 << 14) |
391 | 391 | ||
392 | /* DMA4_OCP_SYSCONFIG bits */ | ||
393 | #define DMA_SYSCONFIG_MIDLEMODE_MASK (3 << 12) | ||
394 | #define DMA_SYSCONFIG_CLOCKACTIVITY_MASK (3 << 8) | ||
395 | #define DMA_SYSCONFIG_EMUFREE (1 << 5) | ||
396 | #define DMA_SYSCONFIG_SIDLEMODE_MASK (3 << 3) | ||
397 | #define DMA_SYSCONFIG_SOFTRESET (1 << 2) | ||
398 | #define DMA_SYSCONFIG_AUTOIDLE (1 << 0) | ||
399 | |||
400 | #define DMA_SYSCONFIG_MIDLEMODE(n) ((n) << 12) | ||
401 | #define DMA_SYSCONFIG_SIDLEMODE(n) ((n) << 3) | ||
402 | |||
403 | #define DMA_IDLEMODE_SMARTIDLE 0x2 | ||
404 | #define DMA_IDLEMODE_NO_IDLE 0x1 | ||
405 | #define DMA_IDLEMODE_FORCE_IDLE 0x0 | ||
406 | |||
392 | /* Chaining modes*/ | 407 | /* Chaining modes*/ |
393 | #ifndef CONFIG_ARCH_OMAP1 | 408 | #ifndef CONFIG_ARCH_OMAP1 |
394 | #define OMAP_DMA_STATIC_CHAIN 0x1 | 409 | #define OMAP_DMA_STATIC_CHAIN 0x1 |