diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2010-02-18 11:30:02 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-03-01 21:12:03 -0500 |
commit | c014906a870ce70e009def0c9d170ccabeb0be63 (patch) | |
tree | b1cfb6520ed0bcdfb0f1b32282b94658a989b04f /arch | |
parent | c8e3149ba7de24dfd4c37bb0df23c878cdecd8d4 (diff) |
dmaengine: shdma: extend .device_terminate_all() to record partial transfer
This patch extends the .device_terminate_all() method of the shdma driver
to return number of bytes transfered in the current descriptor.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/include/asm/dmaengine.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/sh/include/asm/dmaengine.h b/arch/sh/include/asm/dmaengine.h index 9586e4a482b1..bf2f30cf0a27 100644 --- a/arch/sh/include/asm/dmaengine.h +++ b/arch/sh/include/asm/dmaengine.h | |||
@@ -10,6 +10,9 @@ | |||
10 | #ifndef ASM_DMAENGINE_H | 10 | #ifndef ASM_DMAENGINE_H |
11 | #define ASM_DMAENGINE_H | 11 | #define ASM_DMAENGINE_H |
12 | 12 | ||
13 | #include <linux/dmaengine.h> | ||
14 | #include <linux/list.h> | ||
15 | |||
13 | #include <asm/dma-register.h> | 16 | #include <asm/dma-register.h> |
14 | 17 | ||
15 | #define SH_DMAC_MAX_CHANNELS 6 | 18 | #define SH_DMAC_MAX_CHANNELS 6 |
@@ -70,4 +73,21 @@ struct sh_dmae_slave { | |||
70 | struct sh_dmae_slave_config *config; /* Set by the driver */ | 73 | struct sh_dmae_slave_config *config; /* Set by the driver */ |
71 | }; | 74 | }; |
72 | 75 | ||
76 | struct sh_dmae_regs { | ||
77 | u32 sar; /* SAR / source address */ | ||
78 | u32 dar; /* DAR / destination address */ | ||
79 | u32 tcr; /* TCR / transfer count */ | ||
80 | }; | ||
81 | |||
82 | struct sh_desc { | ||
83 | struct sh_dmae_regs hw; | ||
84 | struct list_head node; | ||
85 | struct dma_async_tx_descriptor async_tx; | ||
86 | enum dma_data_direction direction; | ||
87 | dma_cookie_t cookie; | ||
88 | size_t partial; | ||
89 | int chunks; | ||
90 | int mark; | ||
91 | }; | ||
92 | |||
73 | #endif | 93 | #endif |