/* * drivers/dma/imx-sdma.c * * This file contains a driver for the Freescale Smart DMA engine * * Copyright 2010 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> * * Based on code from Freescale: * * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved. * * The code contained herein is licensed under the GNU General Public * License. You may obtain a copy of the GNU General Public License * Version 2 or later at the following locations: * * http://www.opensource.org/licenses/gpl-license.html * http://www.gnu.org/copyleft/gpl.html */#include<linux/init.h>#include<linux/module.h>#include<linux/types.h>#include<linux/bitops.h>#include<linux/mm.h>#include<linux/interrupt.h>#include<linux/clk.h>#include<linux/delay.h>#include<linux/sched.h>#include<linux/semaphore.h>#include<linux/spinlock.h>#include<linux/device.h>#include<linux/dma-mapping.h>#include<linux/firmware.h>#include<linux/slab.h>#include<linux/platform_device.h>#include<linux/dmaengine.h>#include<linux/of.h>#include<linux/of_device.h>#include<asm/irq.h>#include<mach/sdma.h>#include<mach/dma.h>#include<mach/hardware.h>#include"dmaengine.h"/* SDMA registers */#define SDMA_H_C0PTR 0x000#define SDMA_H_INTR 0x004#define SDMA_H_STATSTOP 0x008#define SDMA_H_START 0x00c#define SDMA_H_EVTOVR 0x010#define SDMA_H_DSPOVR 0x014#define SDMA_H_HOSTOVR 0x018#define SDMA_H_EVTPEND 0x01c#define SDMA_H_DSPENBL 0x020#define SDMA_H_RESET 0x024#define SDMA_H_EVTERR 0x028#define SDMA_H_INTRMSK 0x02c#define SDMA_H_PSW 0x030#define SDMA_H_EVTERRDBG 0x034#define SDMA_H_CONFIG 0x038#define SDMA_ONCE_ENB 0x040#define SDMA_ONCE_DATA 0x044#define SDMA_ONCE_INSTR 0x048#define SDMA_ONCE_STAT 0x04c#define SDMA_ONCE_CMD 0x050#define SDMA_EVT_MIRROR 0x054#define SDMA_ILLINSTADDR 0x058#define SDMA_CHN0ADDR 0x05c#define SDMA_ONCE_RTB 0x060#define SDMA_XTRIG_CONF1 0x070#define SDMA_XTRIG_CONF2 0x074#define SDMA_CHNENBL0_IMX35 0x200#define SDMA_CHNENBL0_IMX31 0x080#define SDMA_CHNPRI_0 0x100