diff options
Diffstat (limited to 'drivers/dma/shdma.h')
-rw-r--r-- | drivers/dma/shdma.h | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/drivers/dma/shdma.h b/drivers/dma/shdma.h index 7e227f3c87c4..153609a1e96c 100644 --- a/drivers/dma/shdma.h +++ b/drivers/dma/shdma.h | |||
@@ -17,23 +17,9 @@ | |||
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
19 | 19 | ||
20 | #define SH_DMA_TCR_MAX 0x00FFFFFF /* 16MB */ | 20 | #include <asm/dmaengine.h> |
21 | |||
22 | struct sh_dmae_regs { | ||
23 | u32 sar; /* SAR / source address */ | ||
24 | u32 dar; /* DAR / destination address */ | ||
25 | u32 tcr; /* TCR / transfer count */ | ||
26 | }; | ||
27 | 21 | ||
28 | struct sh_desc { | 22 | #define SH_DMA_TCR_MAX 0x00FFFFFF /* 16MB */ |
29 | struct sh_dmae_regs hw; | ||
30 | struct list_head node; | ||
31 | struct dma_async_tx_descriptor async_tx; | ||
32 | enum dma_data_direction direction; | ||
33 | dma_cookie_t cookie; | ||
34 | int chunks; | ||
35 | int mark; | ||
36 | }; | ||
37 | 23 | ||
38 | struct device; | 24 | struct device; |
39 | 25 | ||
@@ -47,14 +33,18 @@ struct sh_dmae_chan { | |||
47 | struct tasklet_struct tasklet; /* Tasklet */ | 33 | struct tasklet_struct tasklet; /* Tasklet */ |
48 | int descs_allocated; /* desc count */ | 34 | int descs_allocated; /* desc count */ |
49 | int xmit_shift; /* log_2(bytes_per_xfer) */ | 35 | int xmit_shift; /* log_2(bytes_per_xfer) */ |
36 | int irq; | ||
50 | int id; /* Raw id of this channel */ | 37 | int id; /* Raw id of this channel */ |
38 | u32 __iomem *base; | ||
51 | char dev_id[16]; /* unique name per DMAC of channel */ | 39 | char dev_id[16]; /* unique name per DMAC of channel */ |
52 | }; | 40 | }; |
53 | 41 | ||
54 | struct sh_dmae_device { | 42 | struct sh_dmae_device { |
55 | struct dma_device common; | 43 | struct dma_device common; |
56 | struct sh_dmae_chan *chan[MAX_DMA_CHANNELS]; | 44 | struct sh_dmae_chan *chan[SH_DMAC_MAX_CHANNELS]; |
57 | struct sh_dmae_pdata pdata; | 45 | struct sh_dmae_pdata *pdata; |
46 | u32 __iomem *chan_reg; | ||
47 | u16 __iomem *dmars; | ||
58 | }; | 48 | }; |
59 | 49 | ||
60 | #define to_sh_chan(chan) container_of(chan, struct sh_dmae_chan, common) | 50 | #define to_sh_chan(chan) container_of(chan, struct sh_dmae_chan, common) |