- DMA interrupt disable routine added - Added DMA controller reset to DMA context restore Signed-off-by: Tero Kristo <tero.kristo@xxxxxxxxx> --- arch/arm/plat-omap/dma.c | 14 ++++++++++++++ arch/arm/plat-omap/include/mach/dma.h | 2 ++ 2 files changed, 16 insertions(+), 0 deletions(-) mode change 100644 => 100755 arch/arm/plat-omap/dma.c mode change 100644 => 100755 arch/arm/plat-omap/include/mach/dma.h diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c old mode 100644 new mode 100755 index 38c57ce..4d4016f --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -2309,6 +2309,9 @@ EXPORT_SYMBOL(omap_dma_global_context_save); void omap_dma_global_context_restore(void) { + dma_write(0x2, OCP_SYSCONFIG); + while (!__raw_readl(omap_dma_base + OMAP_DMA4_SYSSTATUS)) + ; dma_write(omap_dma_global_context.dma_gcr, GCR); dma_write(omap_dma_global_context.dma_ocp_sysconfig, OCP_SYSCONFIG); @@ -2317,6 +2320,17 @@ void omap_dma_global_context_restore(void) } EXPORT_SYMBOL(omap_dma_global_context_restore); +void omap_dma_disable_irq(int lch) +{ + u32 val; + if (cpu_class_is_omap2()) { + /* Disable interrupts */ + val = dma_read(IRQENABLE_L0); + val &= ~(1 << lch); + dma_write(val, IRQENABLE_L0); + } +} + /*----------------------------------------------------------------------------*/ static int __init omap_init_dma(void) diff --git a/arch/arm/plat-omap/include/mach/dma.h b/arch/arm/plat-omap/include/mach/dma.h old mode 100644 new mode 100755 index f1f588a..1cd390d --- a/arch/arm/plat-omap/include/mach/dma.h +++ b/arch/arm/plat-omap/include/mach/dma.h @@ -531,6 +531,8 @@ extern int omap_get_dma_index(int lch, int *ei, int *fi); void omap_dma_global_context_save(void); void omap_dma_global_context_restore(void); +extern void omap_dma_disable_irq(int lch); + /* Chaining APIs */ #ifndef CONFIG_ARCH_OMAP1 extern int omap_request_dma_chain(int dev_id, const char *dev_name, -- 1.5.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html