/* * linux/arch/arm/plat-omap/dma.c * * Copyright (C) 2003 Nokia Corporation * Author: Juha Yrj�l� <juha.yrjola@nokia.com> * DMA channel linking for 1610 by Samuel Ortiz <samuel.ortiz@nokia.com> * Graphics DMA and LCD DMA graphics tranformations * by Imre Deak <imre.deak@nokia.com> * OMAP2 support Copyright (C) 2004-2005 Texas Instruments, Inc. * Merged to support both OMAP1 and OMAP2 by Tony Lindgren <tony@atomide.com> * Some functions based on earlier dma-omap.c Copyright (C) 2001 RidgeRun, Inc. * * Support functions for the OMAP internal DMA channels. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * */#include<linux/module.h>#include<linux/init.h>#include<linux/sched.h>#include<linux/spinlock.h>#include<linux/errno.h>#include<linux/interrupt.h>#include<linux/irq.h>#include<asm/system.h>#include<asm/hardware.h>#include<asm/dma.h>#include<asm/io.h>#include<asm/arch/tc.h>#define DEBUG_PRINTS#undef DEBUG_PRINTS#ifdef DEBUG_PRINTS#define debug_printk(x) printk x#else#define debug_printk(x)#endif#define OMAP_DMA_ACTIVE 0x01#define OMAP_DMA_CCR_EN (1 << 7)#define OMAP2_DMA_CSR_CLEAR_MASK 0xffe#define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec)staticintenable_1510_mode=0;structomap_dma_lch{intnext_lch;intdev_id;u16saved_csr;u16enabled_irqs;constchar*dev_name;void(*callback)(intlch