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: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kevin Hilman <khilman@ti.deeprootsystems.com>
This commit is contained in:
parent
5b0acc59d1
commit
aecedb94b3
|
@ -2457,6 +2457,19 @@ static int __init omap_init_dma(void)
|
|||
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 */
|
||||
if (cpu_class_is_omap1()) {
|
||||
r = request_irq(INT_DMA_LCD, lcd_dma_irq_handler, 0,
|
||||
|
|
|
@ -389,6 +389,21 @@
|
|||
#define DMA_THREAD_FIFO_25 (0x02 << 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*/
|
||||
#ifndef CONFIG_ARCH_OMAP1
|
||||
#define OMAP_DMA_STATIC_CHAIN 0x1
|
||||
|
|
Loading…
Reference in a new issue