aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-05-09 11:09:21 -0400
committerVinod Koul <vinod.koul@linux.intel.com>2012-07-12 23:43:08 -0400
commitce3a1ab74264b860450709e4bd0dcfc2d0bfc7f8 (patch)
tree445fdd53ae7775810d0b05ca90c392ee25367889 /include
parentb8373147ed3ca01a968d81f22688f2836a9aeb6b (diff)
dma: shdma: convert to the shdma base library
The shdma base library has originally been extracted from the shdma driver, which now can be converted to actually use it. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sh_dma.h33
1 files changed, 10 insertions, 23 deletions
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h
index e081e8e8d109..7c8ca41e60e6 100644
--- a/include/linux/sh_dma.h
+++ b/include/linux/sh_dma.h
@@ -13,34 +13,21 @@
13#include <linux/dmaengine.h> 13#include <linux/dmaengine.h>
14#include <linux/list.h> 14#include <linux/list.h>
15#include <linux/shdma-base.h> 15#include <linux/shdma-base.h>
16#include <linux/types.h>
17
18struct device;
16 19
17/* Used by slave DMA clients to request DMA to/from a specific peripheral */ 20/* Used by slave DMA clients to request DMA to/from a specific peripheral */
18struct sh_dmae_slave { 21struct sh_dmae_slave {
19 union { 22 struct shdma_slave shdma_slave; /* Set by the platform */
20 unsigned int slave_id; /* Set by the platform */ 23 struct device *dma_dev; /* Set by the platform */
21 struct shdma_slave shdma_slave; 24 const struct sh_dmae_slave_config *config; /* Set by the driver */
22 };
23 struct device *dma_dev; /* Set by the platform */
24 const struct sh_dmae_slave_config *config; /* Set by the driver */
25};
26
27struct sh_dmae_regs {
28 u32 sar; /* SAR / source address */
29 u32 dar; /* DAR / destination address */
30 u32 tcr; /* TCR / transfer count */
31};
32
33struct sh_desc {
34 struct sh_dmae_regs hw;
35 struct list_head node;
36 struct dma_async_tx_descriptor async_tx;
37 enum dma_transfer_direction direction;
38 dma_cookie_t cookie;
39 size_t partial;
40 int chunks;
41 int mark;
42}; 25};
43 26
27/*
28 * Supplied by platforms to specify, how a DMA channel has to be configured for
29 * a certain peripheral
30 */
44struct sh_dmae_slave_config { 31struct sh_dmae_slave_config {
45 unsigned int slave_id; 32 unsigned int slave_id;
46 dma_addr_t addr; 33 dma_addr_t addr;