aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/dmaengine.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/include/asm/dmaengine.h')
-rw-r--r--arch/sh/include/asm/dmaengine.h73
1 files changed, 73 insertions, 0 deletions
diff --git a/arch/sh/include/asm/dmaengine.h b/arch/sh/include/asm/dmaengine.h
new file mode 100644
index 000000000000..9586e4a482b1
--- /dev/null
+++ b/arch/sh/include/asm/dmaengine.h
@@ -0,0 +1,73 @@
1/*
2 * Header for the new SH dmaengine driver
3 *
4 * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef ASM_DMAENGINE_H
11#define ASM_DMAENGINE_H
12
13#include <asm/dma-register.h>
14
15#define SH_DMAC_MAX_CHANNELS 6
16
17enum sh_dmae_slave_chan_id {
18 SHDMA_SLAVE_SCIF0_TX,
19 SHDMA_SLAVE_SCIF0_RX,
20 SHDMA_SLAVE_SCIF1_TX,
21 SHDMA_SLAVE_SCIF1_RX,
22 SHDMA_SLAVE_SCIF2_TX,
23 SHDMA_SLAVE_SCIF2_RX,
24 SHDMA_SLAVE_SCIF3_TX,
25 SHDMA_SLAVE_SCIF3_RX,
26 SHDMA_SLAVE_SCIF4_TX,
27 SHDMA_SLAVE_SCIF4_RX,
28 SHDMA_SLAVE_SCIF5_TX,
29 SHDMA_SLAVE_SCIF5_RX,
30 SHDMA_SLAVE_SIUA_TX,
31 SHDMA_SLAVE_SIUA_RX,
32 SHDMA_SLAVE_SIUB_TX,
33 SHDMA_SLAVE_SIUB_RX,
34 SHDMA_SLAVE_NUMBER, /* Must stay last */
35};
36
37struct sh_dmae_slave_config {
38 enum sh_dmae_slave_chan_id slave_id;
39 dma_addr_t addr;
40 u32 chcr;
41 char mid_rid;
42};
43
44struct sh_dmae_channel {
45 unsigned int offset;
46 unsigned int dmars;
47 unsigned int dmars_bit;
48};
49
50struct sh_dmae_pdata {
51 struct sh_dmae_slave_config *slave;
52 int slave_num;
53 struct sh_dmae_channel *channel;
54 int channel_num;
55 unsigned int ts_low_shift;
56 unsigned int ts_low_mask;
57 unsigned int ts_high_shift;
58 unsigned int ts_high_mask;
59 unsigned int *ts_shift;
60 int ts_shift_num;
61 u16 dmaor_init;
62};
63
64struct device;
65
66/* Used by slave DMA clients to request DMA to/from a specific peripheral */
67struct sh_dmae_slave {
68 enum sh_dmae_slave_chan_id slave_id; /* Set by the platform */
69 struct device *dma_dev; /* Set by the platform */
70 struct sh_dmae_slave_config *config; /* Set by the driver */
71};
72
73#endif