diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/sh/include/asm/dma-sh.h | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/sh/include/asm/dma-sh.h')
-rw-r--r-- | arch/sh/include/asm/dma-sh.h | 63 |
1 files changed, 9 insertions, 54 deletions
diff --git a/arch/sh/include/asm/dma-sh.h b/arch/sh/include/asm/dma-sh.h index 78eed3e0bdf5..f3acb8e34c6b 100644 --- a/arch/sh/include/asm/dma-sh.h +++ b/arch/sh/include/asm/dma-sh.h | |||
@@ -11,7 +11,8 @@ | |||
11 | #ifndef __DMA_SH_H | 11 | #ifndef __DMA_SH_H |
12 | #define __DMA_SH_H | 12 | #define __DMA_SH_H |
13 | 13 | ||
14 | #include <asm/dma.h> | 14 | #include <asm/dma-register.h> |
15 | #include <cpu/dma-register.h> | ||
15 | #include <cpu/dma.h> | 16 | #include <cpu/dma.h> |
16 | 17 | ||
17 | /* DMAOR contorl: The DMAOR access size is different by CPU.*/ | 18 | /* DMAOR contorl: The DMAOR access size is different by CPU.*/ |
@@ -20,14 +21,14 @@ | |||
20 | defined(CONFIG_CPU_SUBTYPE_SH7780) || \ | 21 | defined(CONFIG_CPU_SUBTYPE_SH7780) || \ |
21 | defined(CONFIG_CPU_SUBTYPE_SH7785) | 22 | defined(CONFIG_CPU_SUBTYPE_SH7785) |
22 | #define dmaor_read_reg(n) \ | 23 | #define dmaor_read_reg(n) \ |
23 | (n ? ctrl_inw(SH_DMAC_BASE1 + DMAOR) \ | 24 | (n ? __raw_readw(SH_DMAC_BASE1 + DMAOR) \ |
24 | : ctrl_inw(SH_DMAC_BASE0 + DMAOR)) | 25 | : __raw_readw(SH_DMAC_BASE0 + DMAOR)) |
25 | #define dmaor_write_reg(n, data) \ | 26 | #define dmaor_write_reg(n, data) \ |
26 | (n ? ctrl_outw(data, SH_DMAC_BASE1 + DMAOR) \ | 27 | (n ? __raw_writew(data, SH_DMAC_BASE1 + DMAOR) \ |
27 | : ctrl_outw(data, SH_DMAC_BASE0 + DMAOR)) | 28 | : __raw_writew(data, SH_DMAC_BASE0 + DMAOR)) |
28 | #else /* Other CPU */ | 29 | #else /* Other CPU */ |
29 | #define dmaor_read_reg(n) ctrl_inw(SH_DMAC_BASE0 + DMAOR) | 30 | #define dmaor_read_reg(n) __raw_readw(SH_DMAC_BASE0 + DMAOR) |
30 | #define dmaor_write_reg(n, data) ctrl_outw(data, SH_DMAC_BASE0 + DMAOR) | 31 | #define dmaor_write_reg(n, data) __raw_writew(data, SH_DMAC_BASE0 + DMAOR) |
31 | #endif | 32 | #endif |
32 | 33 | ||
33 | static int dmte_irq_map[] __maybe_unused = { | 34 | static int dmte_irq_map[] __maybe_unused = { |
@@ -53,37 +54,11 @@ static int dmte_irq_map[] __maybe_unused = { | |||
53 | #endif | 54 | #endif |
54 | }; | 55 | }; |
55 | 56 | ||
56 | /* Definitions for the SuperH DMAC */ | ||
57 | #define REQ_L 0x00000000 | ||
58 | #define REQ_E 0x00080000 | ||
59 | #define RACK_H 0x00000000 | ||
60 | #define RACK_L 0x00040000 | ||
61 | #define ACK_R 0x00000000 | ||
62 | #define ACK_W 0x00020000 | ||
63 | #define ACK_H 0x00000000 | ||
64 | #define ACK_L 0x00010000 | ||
65 | #define DM_INC 0x00004000 | ||
66 | #define DM_DEC 0x00008000 | ||
67 | #define SM_INC 0x00001000 | ||
68 | #define SM_DEC 0x00002000 | ||
69 | #define RS_IN 0x00000200 | ||
70 | #define RS_OUT 0x00000300 | ||
71 | #define TS_BLK 0x00000040 | ||
72 | #define TM_BUR 0x00000020 | ||
73 | #define CHCR_DE 0x00000001 | ||
74 | #define CHCR_TE 0x00000002 | ||
75 | #define CHCR_IE 0x00000004 | ||
76 | |||
77 | /* DMAOR definitions */ | ||
78 | #define DMAOR_AE 0x00000004 | ||
79 | #define DMAOR_NMIF 0x00000002 | ||
80 | #define DMAOR_DME 0x00000001 | ||
81 | |||
82 | /* | 57 | /* |
83 | * Define the default configuration for dual address memory-memory transfer. | 58 | * Define the default configuration for dual address memory-memory transfer. |
84 | * The 0x400 value represents auto-request, external->external. | 59 | * The 0x400 value represents auto-request, external->external. |
85 | */ | 60 | */ |
86 | #define RS_DUAL (DM_INC | SM_INC | 0x400 | TS_32) | 61 | #define RS_DUAL (DM_INC | SM_INC | 0x400 | TS_INDEX2VAL(XMIT_SZ_32BIT)) |
87 | 62 | ||
88 | /* DMA base address */ | 63 | /* DMA base address */ |
89 | static u32 dma_base_addr[] __maybe_unused = { | 64 | static u32 dma_base_addr[] __maybe_unused = { |
@@ -109,24 +84,4 @@ static u32 dma_base_addr[] __maybe_unused = { | |||
109 | #endif | 84 | #endif |
110 | }; | 85 | }; |
111 | 86 | ||
112 | /* DMA register */ | ||
113 | #define SAR 0x00 | ||
114 | #define DAR 0x04 | ||
115 | #define TCR 0x08 | ||
116 | #define CHCR 0x0C | ||
117 | #define DMAOR 0x40 | ||
118 | |||
119 | /* | ||
120 | * for dma engine | ||
121 | * | ||
122 | * SuperH DMA mode | ||
123 | */ | ||
124 | #define SHDMA_MIX_IRQ (1 << 1) | ||
125 | #define SHDMA_DMAOR1 (1 << 2) | ||
126 | #define SHDMA_DMAE1 (1 << 3) | ||
127 | |||
128 | struct sh_dmae_pdata { | ||
129 | unsigned int mode; | ||
130 | }; | ||
131 | |||
132 | #endif /* __DMA_SH_H */ | 87 | #endif /* __DMA_SH_H */ |