/* * OMAP DMAengine support * * 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/delay.h>#include<linux/dmaengine.h>#include<linux/dma-mapping.h>#include<linux/err.h>#include<linux/init.h>#include<linux/interrupt.h>#include<linux/list.h>#include<linux/module.h>#include<linux/omap-dma.h>#include<linux/platform_device.h>#include<linux/slab.h>#include<linux/spinlock.h>#include<linux/of_dma.h>#include<linux/of_device.h>#include"virt-dma.h"#define OMAP_SDMA_REQUESTS 127#define OMAP_SDMA_CHANNELS 32structomap_dmadev{structdma_deviceddev;spinlock_tlock;void__iomem*base;conststructomap_dma_reg*reg_map;structomap_system_dma_plat_info*plat;boollegacy;unsigneddma_requests;spinlock_tirq_lock;uint32_tirq_enable_mask;structomap_chan**lch_map;};structomap_chan{structvirt_dma_chanvc;void__iomem*channel_base;conststructomap_dma_reg*reg_map;uint32_tccr;structdma_slave_configcfg;unsigneddma_sig;boolcyclic;boolpaused;boolrunning;intdma_ch;structomap_desc*desc;unsignedsgidx;};structomap_sg{dma_addr_taddr;uint32_ten;/* number of elements (24-bit) */uint32_tfn;/* number of frames (16-bit) */int32_tfi;/* for double indexing */int16_tei;/* for double indexing */};structomap_desc{structvirt_dma_descvd;enumdma_transfer_directiondir;dma_addr_tdev_addr;int32_tfi;/* for OMAP_DMA_SYNC_PACKET / double indexing */int16_tei;/* for double indexing */uint8_tes;/* CSDP_DATA_TYPE_xxx */uint32_tccr;/* CCR value */uint16_tclnk_ctrl;/* CLNK_CTRL value */uint16_tcicr;/* CICR value */uint32_tcsdp;/* CSDP value */un