diff options
Diffstat (limited to 'arch/sh/include/asm/dmaengine.h')
-rw-r--r-- | arch/sh/include/asm/dmaengine.h | 63 |
1 files changed, 2 insertions, 61 deletions
diff --git a/arch/sh/include/asm/dmaengine.h b/arch/sh/include/asm/dmaengine.h index bf2f30cf0a2..2a02b611a9a 100644 --- a/arch/sh/include/asm/dmaengine.h +++ b/arch/sh/include/asm/dmaengine.h | |||
@@ -10,14 +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> | 13 | #include <linux/sh_dma.h> |
14 | #include <linux/list.h> | ||
15 | 14 | ||
16 | #include <asm/dma-register.h> | 15 | enum { |
17 | |||
18 | #define SH_DMAC_MAX_CHANNELS 6 | ||
19 | |||
20 | enum sh_dmae_slave_chan_id { | ||
21 | SHDMA_SLAVE_SCIF0_TX, | 16 | SHDMA_SLAVE_SCIF0_TX, |
22 | SHDMA_SLAVE_SCIF0_RX, | 17 | SHDMA_SLAVE_SCIF0_RX, |
23 | SHDMA_SLAVE_SCIF1_TX, | 18 | SHDMA_SLAVE_SCIF1_TX, |
@@ -34,60 +29,6 @@ enum sh_dmae_slave_chan_id { | |||
34 | SHDMA_SLAVE_SIUA_RX, | 29 | SHDMA_SLAVE_SIUA_RX, |
35 | SHDMA_SLAVE_SIUB_TX, | 30 | SHDMA_SLAVE_SIUB_TX, |
36 | SHDMA_SLAVE_SIUB_RX, | 31 | SHDMA_SLAVE_SIUB_RX, |
37 | SHDMA_SLAVE_NUMBER, /* Must stay last */ | ||
38 | }; | ||
39 | |||
40 | struct sh_dmae_slave_config { | ||
41 | enum sh_dmae_slave_chan_id slave_id; | ||
42 | dma_addr_t addr; | ||
43 | u32 chcr; | ||
44 | char mid_rid; | ||
45 | }; | ||
46 | |||
47 | struct sh_dmae_channel { | ||
48 | unsigned int offset; | ||
49 | unsigned int dmars; | ||
50 | unsigned int dmars_bit; | ||
51 | }; | ||
52 | |||
53 | struct sh_dmae_pdata { | ||
54 | struct sh_dmae_slave_config *slave; | ||
55 | int slave_num; | ||
56 | struct sh_dmae_channel *channel; | ||
57 | int channel_num; | ||
58 | unsigned int ts_low_shift; | ||
59 | unsigned int ts_low_mask; | ||
60 | unsigned int ts_high_shift; | ||
61 | unsigned int ts_high_mask; | ||
62 | unsigned int *ts_shift; | ||
63 | int ts_shift_num; | ||
64 | u16 dmaor_init; | ||
65 | }; | ||
66 | |||
67 | struct device; | ||
68 | |||
69 | /* Used by slave DMA clients to request DMA to/from a specific peripheral */ | ||
70 | struct sh_dmae_slave { | ||
71 | enum sh_dmae_slave_chan_id slave_id; /* Set by the platform */ | ||
72 | struct device *dma_dev; /* Set by the platform */ | ||
73 | struct sh_dmae_slave_config *config; /* Set by the driver */ | ||
74 | }; | ||
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 | }; | 32 | }; |
92 | 33 | ||
93 | #endif | 34 | #endif |