Commit aecedb94 authored by Kalle Jokiniemi's avatar Kalle Jokiniemi Committed by Tony Lindgren

OMAP3: DMA: Enable idlemodes for DMA OCP

This patch enables MStandby smart-idle mode, autoidle smartidle mode,
and the autoidle bit for DMA4_OCP_SYSCONFIG.
Signed-off-by: default avatarKalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarKevin Hilman <khilman@ti.deeprootsystems.com>
parent 5b0acc59
...@@ -2457,6 +2457,19 @@ static int __init omap_init_dma(void) ...@@ -2457,6 +2457,19 @@ static int __init omap_init_dma(void)
setup_irq(irq, &omap24xx_dma_irq); setup_irq(irq, &omap24xx_dma_irq);
} }
/* Enable smartidle idlemodes and autoidle */
if (cpu_is_omap34xx()) {
u32 v = dma_read(OCP_SYSCONFIG);
v &= ~(DMA_SYSCONFIG_MIDLEMODE_MASK |
DMA_SYSCONFIG_SIDLEMODE_MASK |
DMA_SYSCONFIG_AUTOIDLE);
v |= (DMA_SYSCONFIG_MIDLEMODE(DMA_IDLEMODE_SMARTIDLE) |
DMA_SYSCONFIG_SIDLEMODE(DMA_IDLEMODE_SMARTIDLE) |
DMA_SYSCONFIG_AUTOIDLE);
dma_write(v , OCP_SYSCONFIG);
}
/* FIXME: Update LCD DMA to work on 24xx */ /* FIXME: Update LCD DMA to work on 24xx */
if (cpu_class_is_omap1()) { if (cpu_class_is_omap1()) {
r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0, r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0,
......
...@@ -389,6 +389,21 @@ ...@@ -389,6 +389,21 @@
#define DMA_THREAD_FIFO_25 (0x02 << 14) #define DMA_THREAD_FIFO_25 (0x02 << 14)
#define DMA_THREAD_FIFO_50 (0x03 << 14) #define DMA_THREAD_FIFO_50 (0x03 << 14)
/* DMA4_OCP_SYSCONFIG bits */
#define DMA_SYSCONFIG_MIDLEMODE_MASK (3 << 12)
#define DMA_SYSCONFIG_CLOCKACTIVITY_MASK (3 << 8)
#define DMA_SYSCONFIG_EMUFREE (1 << 5)
#define DMA_SYSCONFIG_SIDLEMODE_MASK (3 << 3)
#define DMA_SYSCONFIG_SOFTRESET (1 << 2)
#define DMA_SYSCONFIG_AUTOIDLE (1 << 0)
#define DMA_SYSCONFIG_MIDLEMODE(n) ((n) << 12)
#define DMA_SYSCONFIG_SIDLEMODE(n) ((n) << 3)
#define DMA_IDLEMODE_SMARTIDLE 0x2
#define DMA_IDLEMODE_NO_IDLE 0x1
#define DMA_IDLEMODE_FORCE_IDLE 0x0
/* Chaining modes*/ /* Chaining modes*/
#ifndef CONFIG_ARCH_OMAP1 #ifndef CONFIG_ARCH_OMAP1
#define OMAP_DMA_STATIC_CHAIN 0x1 #define OMAP_DMA_STATIC_CHAIN 0x1
......
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