diff options
author | Thomas Abraham <thomas.abraham@linaro.org> | 2011-10-24 05:45:14 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-12-22 20:07:09 -0500 |
commit | 8742e0441d6530d40d85d65a6bcc5a6c0c4eab13 (patch) | |
tree | 8ead1123e28eba6903202c36e58be8d81aeb032a /arch | |
parent | 7c4cab7f401a834bdf3878d417bf77d3290d4cfc (diff) |
ARM: S5PV210: Modify platform data for pl330 driver
With the 'struct dma_pl330_peri' removed, the platfrom data for dma
driver can be simplified to a simple list of peripheral request ids.
Cc: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s5pv210/dma.c | 241 |
1 files changed, 69 insertions, 172 deletions
diff --git a/arch/arm/mach-s5pv210/dma.c b/arch/arm/mach-s5pv210/dma.c index 86b749c18b77..a6113e0267f2 100644 --- a/arch/arm/mach-s5pv210/dma.c +++ b/arch/arm/mach-s5pv210/dma.c | |||
@@ -35,90 +35,40 @@ | |||
35 | 35 | ||
36 | static u64 dma_dmamask = DMA_BIT_MASK(32); | 36 | static u64 dma_dmamask = DMA_BIT_MASK(32); |
37 | 37 | ||
38 | struct dma_pl330_peri pdma0_peri[28] = { | 38 | u8 pdma0_peri[] = { |
39 | { | 39 | DMACH_UART0_RX, |
40 | .peri_id = (u8)DMACH_UART0_RX, | 40 | DMACH_UART0_TX, |
41 | .rqtype = DEVTOMEM, | 41 | DMACH_UART1_RX, |
42 | }, { | 42 | DMACH_UART1_TX, |
43 | .peri_id = (u8)DMACH_UART0_TX, | 43 | DMACH_UART2_RX, |
44 | .rqtype = MEMTODEV, | 44 | DMACH_UART2_TX, |
45 | }, { | 45 | DMACH_UART3_RX, |
46 | .peri_id = (u8)DMACH_UART1_RX, | 46 | DMACH_UART3_TX, |
47 | .rqtype = DEVTOMEM, | 47 | DMACH_MAX, |
48 | }, { | 48 | DMACH_I2S0_RX, |
49 | .peri_id = (u8)DMACH_UART1_TX, | 49 | DMACH_I2S0_TX, |
50 | .rqtype = MEMTODEV, | 50 | DMACH_I2S0S_TX, |
51 | }, { | 51 | DMACH_I2S1_RX, |
52 | .peri_id = (u8)DMACH_UART2_RX, | 52 | DMACH_I2S1_TX, |
53 | .rqtype = DEVTOMEM, | 53 | DMACH_MAX, |
54 | }, { | 54 | DMACH_MAX, |
55 | .peri_id = (u8)DMACH_UART2_TX, | 55 | DMACH_SPI0_RX, |
56 | .rqtype = MEMTODEV, | 56 | DMACH_SPI0_TX, |
57 | }, { | 57 | DMACH_SPI1_RX, |
58 | .peri_id = (u8)DMACH_UART3_RX, | 58 | DMACH_SPI1_TX, |
59 | .rqtype = DEVTOMEM, | 59 | DMACH_MAX, |
60 | }, { | 60 | DMACH_MAX, |
61 | .peri_id = (u8)DMACH_UART3_TX, | 61 | DMACH_AC97_MICIN, |
62 | .rqtype = MEMTODEV, | 62 | DMACH_AC97_PCMIN, |
63 | }, { | 63 | DMACH_AC97_PCMOUT, |
64 | .peri_id = DMACH_MAX, | 64 | DMACH_MAX, |
65 | }, { | 65 | DMACH_PWM, |
66 | .peri_id = (u8)DMACH_I2S0_RX, | 66 | DMACH_SPDIF, |
67 | .rqtype = DEVTOMEM, | ||
68 | }, { | ||
69 | .peri_id = (u8)DMACH_I2S0_TX, | ||
70 | .rqtype = MEMTODEV, | ||
71 | }, { | ||
72 | .peri_id = (u8)DMACH_I2S0S_TX, | ||
73 | .rqtype = MEMTODEV, | ||
74 | }, { | ||
75 | .peri_id = (u8)DMACH_I2S1_RX, | ||
76 | .rqtype = DEVTOMEM, | ||
77 | }, { | ||
78 | .peri_id = (u8)DMACH_I2S1_TX, | ||
79 | .rqtype = MEMTODEV, | ||
80 | }, { | ||
81 | .peri_id = (u8)DMACH_MAX, | ||
82 | }, { | ||
83 | .peri_id = (u8)DMACH_MAX, | ||
84 | }, { | ||
85 | .peri_id = (u8)DMACH_SPI0_RX, | ||
86 | .rqtype = DEVTOMEM, | ||
87 | }, { | ||
88 | .peri_id = (u8)DMACH_SPI0_TX, | ||
89 | .rqtype = MEMTODEV, | ||
90 | }, { | ||
91 | .peri_id = (u8)DMACH_SPI1_RX, | ||
92 | .rqtype = DEVTOMEM, | ||
93 | }, { | ||
94 | .peri_id = (u8)DMACH_SPI1_TX, | ||
95 | .rqtype = MEMTODEV, | ||
96 | }, { | ||
97 | .peri_id = (u8)DMACH_MAX, | ||
98 | }, { | ||
99 | .peri_id = (u8)DMACH_MAX, | ||
100 | }, { | ||
101 | .peri_id = (u8)DMACH_AC97_MICIN, | ||
102 | .rqtype = DEVTOMEM, | ||
103 | }, { | ||
104 | .peri_id = (u8)DMACH_AC97_PCMIN, | ||
105 | .rqtype = DEVTOMEM, | ||
106 | }, { | ||
107 | .peri_id = (u8)DMACH_AC97_PCMOUT, | ||
108 | .rqtype = MEMTODEV, | ||
109 | }, { | ||
110 | .peri_id = (u8)DMACH_MAX, | ||
111 | }, { | ||
112 | .peri_id = (u8)DMACH_PWM, | ||
113 | }, { | ||
114 | .peri_id = (u8)DMACH_SPDIF, | ||
115 | .rqtype = MEMTODEV, | ||
116 | }, | ||
117 | }; | 67 | }; |
118 | 68 | ||
119 | struct dma_pl330_platdata s5pv210_pdma0_pdata = { | 69 | struct dma_pl330_platdata s5pv210_pdma0_pdata = { |
120 | .nr_valid_peri = ARRAY_SIZE(pdma0_peri), | 70 | .nr_valid_peri = ARRAY_SIZE(pdma0_peri), |
121 | .peri = pdma0_peri, | 71 | .peri_id = pdma0_peri, |
122 | }; | 72 | }; |
123 | 73 | ||
124 | struct amba_device s5pv210_device_pdma0 = { | 74 | struct amba_device s5pv210_device_pdma0 = { |
@@ -137,102 +87,44 @@ struct amba_device s5pv210_device_pdma0 = { | |||
137 | .periphid = 0x00041330, | 87 | .periphid = 0x00041330, |
138 | }; | 88 | }; |
139 | 89 | ||
140 | struct dma_pl330_peri pdma1_peri[32] = { | 90 | u8 pdma1_peri[] = { |
141 | { | 91 | DMACH_UART0_RX, |
142 | .peri_id = (u8)DMACH_UART0_RX, | 92 | DMACH_UART0_TX, |
143 | .rqtype = DEVTOMEM, | 93 | DMACH_UART1_RX, |
144 | }, { | 94 | DMACH_UART1_TX, |
145 | .peri_id = (u8)DMACH_UART0_TX, | 95 | DMACH_UART2_RX, |
146 | .rqtype = MEMTODEV, | 96 | DMACH_UART2_TX, |
147 | }, { | 97 | DMACH_UART3_RX, |
148 | .peri_id = (u8)DMACH_UART1_RX, | 98 | DMACH_UART3_TX, |
149 | .rqtype = DEVTOMEM, | 99 | DMACH_MAX, |
150 | }, { | 100 | DMACH_I2S0_RX, |
151 | .peri_id = (u8)DMACH_UART1_TX, | 101 | DMACH_I2S0_TX, |
152 | .rqtype = MEMTODEV, | 102 | DMACH_I2S0S_TX, |
153 | }, { | 103 | DMACH_I2S1_RX, |
154 | .peri_id = (u8)DMACH_UART2_RX, | 104 | DMACH_I2S1_TX, |
155 | .rqtype = DEVTOMEM, | 105 | DMACH_I2S2_RX, |
156 | }, { | 106 | DMACH_I2S2_TX, |
157 | .peri_id = (u8)DMACH_UART2_TX, | 107 | DMACH_SPI0_RX, |
158 | .rqtype = MEMTODEV, | 108 | DMACH_SPI0_TX, |
159 | }, { | 109 | DMACH_SPI1_RX, |
160 | .peri_id = (u8)DMACH_UART3_RX, | 110 | DMACH_SPI1_TX, |
161 | .rqtype = DEVTOMEM, | 111 | DMACH_MAX, |
162 | }, { | 112 | DMACH_MAX, |
163 | .peri_id = (u8)DMACH_UART3_TX, | 113 | DMACH_PCM0_RX, |
164 | .rqtype = MEMTODEV, | 114 | DMACH_PCM0_TX, |
165 | }, { | 115 | DMACH_PCM1_RX, |
166 | .peri_id = DMACH_MAX, | 116 | DMACH_PCM1_TX, |
167 | }, { | 117 | DMACH_MSM_REQ0, |
168 | .peri_id = (u8)DMACH_I2S0_RX, | 118 | DMACH_MSM_REQ1, |
169 | .rqtype = DEVTOMEM, | 119 | DMACH_MSM_REQ2, |
170 | }, { | 120 | DMACH_MSM_REQ3, |
171 | .peri_id = (u8)DMACH_I2S0_TX, | 121 | DMACH_PCM2_RX, |
172 | .rqtype = MEMTODEV, | 122 | DMACH_PCM2_TX, |
173 | }, { | ||
174 | .peri_id = (u8)DMACH_I2S0S_TX, | ||
175 | .rqtype = MEMTODEV, | ||
176 | }, { | ||
177 | .peri_id = (u8)DMACH_I2S1_RX, | ||
178 | .rqtype = DEVTOMEM, | ||
179 | }, { | ||
180 | .peri_id = (u8)DMACH_I2S1_TX, | ||
181 | .rqtype = MEMTODEV, | ||
182 | }, { | ||
183 | .peri_id = (u8)DMACH_I2S2_RX, | ||
184 | .rqtype = DEVTOMEM, | ||
185 | }, { | ||
186 | .peri_id = (u8)DMACH_I2S2_TX, | ||
187 | .rqtype = MEMTODEV, | ||
188 | }, { | ||
189 | .peri_id = (u8)DMACH_SPI0_RX, | ||
190 | .rqtype = DEVTOMEM, | ||
191 | }, { | ||
192 | .peri_id = (u8)DMACH_SPI0_TX, | ||
193 | .rqtype = MEMTODEV, | ||
194 | }, { | ||
195 | .peri_id = (u8)DMACH_SPI1_RX, | ||
196 | .rqtype = DEVTOMEM, | ||
197 | }, { | ||
198 | .peri_id = (u8)DMACH_SPI1_TX, | ||
199 | .rqtype = MEMTODEV, | ||
200 | }, { | ||
201 | .peri_id = (u8)DMACH_MAX, | ||
202 | }, { | ||
203 | .peri_id = (u8)DMACH_MAX, | ||
204 | }, { | ||
205 | .peri_id = (u8)DMACH_PCM0_RX, | ||
206 | .rqtype = DEVTOMEM, | ||
207 | }, { | ||
208 | .peri_id = (u8)DMACH_PCM0_TX, | ||
209 | .rqtype = MEMTODEV, | ||
210 | }, { | ||
211 | .peri_id = (u8)DMACH_PCM1_RX, | ||
212 | .rqtype = DEVTOMEM, | ||
213 | }, { | ||
214 | .peri_id = (u8)DMACH_PCM1_TX, | ||
215 | .rqtype = MEMTODEV, | ||
216 | }, { | ||
217 | .peri_id = (u8)DMACH_MSM_REQ0, | ||
218 | }, { | ||
219 | .peri_id = (u8)DMACH_MSM_REQ1, | ||
220 | }, { | ||
221 | .peri_id = (u8)DMACH_MSM_REQ2, | ||
222 | }, { | ||
223 | .peri_id = (u8)DMACH_MSM_REQ3, | ||
224 | }, { | ||
225 | .peri_id = (u8)DMACH_PCM2_RX, | ||
226 | .rqtype = DEVTOMEM, | ||
227 | }, { | ||
228 | .peri_id = (u8)DMACH_PCM2_TX, | ||
229 | .rqtype = MEMTODEV, | ||
230 | }, | ||
231 | }; | 123 | }; |
232 | 124 | ||
233 | struct dma_pl330_platdata s5pv210_pdma1_pdata = { | 125 | struct dma_pl330_platdata s5pv210_pdma1_pdata = { |
234 | .nr_valid_peri = ARRAY_SIZE(pdma1_peri), | 126 | .nr_valid_peri = ARRAY_SIZE(pdma1_peri), |
235 | .peri = pdma1_peri, | 127 | .peri_id = pdma1_peri, |
236 | }; | 128 | }; |
237 | 129 | ||
238 | struct amba_device s5pv210_device_pdma1 = { | 130 | struct amba_device s5pv210_device_pdma1 = { |
@@ -253,7 +145,12 @@ struct amba_device s5pv210_device_pdma1 = { | |||
253 | 145 | ||
254 | static int __init s5pv210_dma_init(void) | 146 | static int __init s5pv210_dma_init(void) |
255 | { | 147 | { |
148 | dma_cap_set(DMA_SLAVE, s5pv210_pdma0_pdata.cap_mask); | ||
149 | dma_cap_set(DMA_CYCLIC, s5pv210_pdma0_pdata.cap_mask); | ||
256 | amba_device_register(&s5pv210_device_pdma0, &iomem_resource); | 150 | amba_device_register(&s5pv210_device_pdma0, &iomem_resource); |
151 | |||
152 | dma_cap_set(DMA_SLAVE, s5pv210_pdma1_pdata.cap_mask); | ||
153 | dma_cap_set(DMA_CYCLIC, s5pv210_pdma1_pdata.cap_mask); | ||
257 | amba_device_register(&s5pv210_device_pdma1, &iomem_resource); | 154 | amba_device_register(&s5pv210_device_pdma1, &iomem_resource); |
258 | 155 | ||
259 | return 0; | 156 | return 0; |