diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2012-05-12 03:12:30 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-05-12 03:12:30 -0400 |
commit | 58ff20af415d816614427e96db3f90ad71b188a4 (patch) | |
tree | c97f379d8eacbca741ca0123f846e0c80a690264 /arch/arm/mach-s5pv210 | |
parent | 982300055897609b1b924b9b576fcb2b48021b69 (diff) |
ARM: S5PV210: Use common macro to define resources on dev-audio.c
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210')
-rw-r--r-- | arch/arm/mach-s5pv210/dev-audio.c | 156 |
1 files changed, 26 insertions, 130 deletions
diff --git a/arch/arm/mach-s5pv210/dev-audio.c b/arch/arm/mach-s5pv210/dev-audio.c index 63f5d82004b5..8367749c3eec 100644 --- a/arch/arm/mach-s5pv210/dev-audio.c +++ b/arch/arm/mach-s5pv210/dev-audio.c | |||
@@ -59,26 +59,10 @@ static struct s3c_audio_pdata i2sv5_pdata = { | |||
59 | }; | 59 | }; |
60 | 60 | ||
61 | static struct resource s5pv210_iis0_resource[] = { | 61 | static struct resource s5pv210_iis0_resource[] = { |
62 | [0] = { | 62 | [0] = DEFINE_RES_MEM(S5PV210_PA_IIS0, SZ_256), |
63 | .start = S5PV210_PA_IIS0, | 63 | [1] = DEFINE_RES_DMA(DMACH_I2S0_TX), |
64 | .end = S5PV210_PA_IIS0 + 0x100 - 1, | 64 | [2] = DEFINE_RES_DMA(DMACH_I2S0_RX), |
65 | .flags = IORESOURCE_MEM, | 65 | [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX), |
66 | }, | ||
67 | [1] = { | ||
68 | .start = DMACH_I2S0_TX, | ||
69 | .end = DMACH_I2S0_TX, | ||
70 | .flags = IORESOURCE_DMA, | ||
71 | }, | ||
72 | [2] = { | ||
73 | .start = DMACH_I2S0_RX, | ||
74 | .end = DMACH_I2S0_RX, | ||
75 | .flags = IORESOURCE_DMA, | ||
76 | }, | ||
77 | [3] = { | ||
78 | .start = DMACH_I2S0S_TX, | ||
79 | .end = DMACH_I2S0S_TX, | ||
80 | .flags = IORESOURCE_DMA, | ||
81 | }, | ||
82 | }; | 66 | }; |
83 | 67 | ||
84 | struct platform_device s5pv210_device_iis0 = { | 68 | struct platform_device s5pv210_device_iis0 = { |
@@ -106,21 +90,9 @@ static struct s3c_audio_pdata i2sv3_pdata = { | |||
106 | }; | 90 | }; |
107 | 91 | ||
108 | static struct resource s5pv210_iis1_resource[] = { | 92 | static struct resource s5pv210_iis1_resource[] = { |
109 | [0] = { | 93 | [0] = DEFINE_RES_MEM(S5PV210_PA_IIS1, SZ_256), |
110 | .start = S5PV210_PA_IIS1, | 94 | [1] = DEFINE_RES_DMA(DMACH_I2S1_TX), |
111 | .end = S5PV210_PA_IIS1 + 0x100 - 1, | 95 | [2] = DEFINE_RES_DMA(DMACH_I2S1_RX), |
112 | .flags = IORESOURCE_MEM, | ||
113 | }, | ||
114 | [1] = { | ||
115 | .start = DMACH_I2S1_TX, | ||
116 | .end = DMACH_I2S1_TX, | ||
117 | .flags = IORESOURCE_DMA, | ||
118 | }, | ||
119 | [2] = { | ||
120 | .start = DMACH_I2S1_RX, | ||
121 | .end = DMACH_I2S1_RX, | ||
122 | .flags = IORESOURCE_DMA, | ||
123 | }, | ||
124 | }; | 96 | }; |
125 | 97 | ||
126 | struct platform_device s5pv210_device_iis1 = { | 98 | struct platform_device s5pv210_device_iis1 = { |
@@ -134,21 +106,9 @@ struct platform_device s5pv210_device_iis1 = { | |||
134 | }; | 106 | }; |
135 | 107 | ||
136 | static struct resource s5pv210_iis2_resource[] = { | 108 | static struct resource s5pv210_iis2_resource[] = { |
137 | [0] = { | 109 | [0] = DEFINE_RES_MEM(S5PV210_PA_IIS2, SZ_256), |
138 | .start = S5PV210_PA_IIS2, | 110 | [1] = DEFINE_RES_DMA(DMACH_I2S2_TX), |
139 | .end = S5PV210_PA_IIS2 + 0x100 - 1, | 111 | [2] = DEFINE_RES_DMA(DMACH_I2S2_RX), |
140 | .flags = IORESOURCE_MEM, | ||
141 | }, | ||
142 | [1] = { | ||
143 | .start = DMACH_I2S2_TX, | ||
144 | .end = DMACH_I2S2_TX, | ||
145 | .flags = IORESOURCE_DMA, | ||
146 | }, | ||
147 | [2] = { | ||
148 | .start = DMACH_I2S2_RX, | ||
149 | .end = DMACH_I2S2_RX, | ||
150 | .flags = IORESOURCE_DMA, | ||
151 | }, | ||
152 | }; | 112 | }; |
153 | 113 | ||
154 | struct platform_device s5pv210_device_iis2 = { | 114 | struct platform_device s5pv210_device_iis2 = { |
@@ -188,21 +148,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = { | |||
188 | }; | 148 | }; |
189 | 149 | ||
190 | static struct resource s5pv210_pcm0_resource[] = { | 150 | static struct resource s5pv210_pcm0_resource[] = { |
191 | [0] = { | 151 | [0] = DEFINE_RES_MEM(S5PV210_PA_PCM0, SZ_256), |
192 | .start = S5PV210_PA_PCM0, | 152 | [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), |
193 | .end = S5PV210_PA_PCM0 + 0x100 - 1, | 153 | [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), |
194 | .flags = IORESOURCE_MEM, | ||
195 | }, | ||
196 | [1] = { | ||
197 | .start = DMACH_PCM0_TX, | ||
198 | .end = DMACH_PCM0_TX, | ||
199 | .flags = IORESOURCE_DMA, | ||
200 | }, | ||
201 | [2] = { | ||
202 | .start = DMACH_PCM0_RX, | ||
203 | .end = DMACH_PCM0_RX, | ||
204 | .flags = IORESOURCE_DMA, | ||
205 | }, | ||
206 | }; | 154 | }; |
207 | 155 | ||
208 | struct platform_device s5pv210_device_pcm0 = { | 156 | struct platform_device s5pv210_device_pcm0 = { |
@@ -216,21 +164,9 @@ struct platform_device s5pv210_device_pcm0 = { | |||
216 | }; | 164 | }; |
217 | 165 | ||
218 | static struct resource s5pv210_pcm1_resource[] = { | 166 | static struct resource s5pv210_pcm1_resource[] = { |
219 | [0] = { | 167 | [0] = DEFINE_RES_MEM(S5PV210_PA_PCM1, SZ_256), |
220 | .start = S5PV210_PA_PCM1, | 168 | [1] = DEFINE_RES_DMA(DMACH_PCM1_TX), |
221 | .end = S5PV210_PA_PCM1 + 0x100 - 1, | 169 | [2] = DEFINE_RES_DMA(DMACH_PCM1_RX), |
222 | .flags = IORESOURCE_MEM, | ||
223 | }, | ||
224 | [1] = { | ||
225 | .start = DMACH_PCM1_TX, | ||
226 | .end = DMACH_PCM1_TX, | ||
227 | .flags = IORESOURCE_DMA, | ||
228 | }, | ||
229 | [2] = { | ||
230 | .start = DMACH_PCM1_RX, | ||
231 | .end = DMACH_PCM1_RX, | ||
232 | .flags = IORESOURCE_DMA, | ||
233 | }, | ||
234 | }; | 170 | }; |
235 | 171 | ||
236 | struct platform_device s5pv210_device_pcm1 = { | 172 | struct platform_device s5pv210_device_pcm1 = { |
@@ -244,21 +180,9 @@ struct platform_device s5pv210_device_pcm1 = { | |||
244 | }; | 180 | }; |
245 | 181 | ||
246 | static struct resource s5pv210_pcm2_resource[] = { | 182 | static struct resource s5pv210_pcm2_resource[] = { |
247 | [0] = { | 183 | [0] = DEFINE_RES_MEM(S5PV210_PA_PCM2, SZ_256), |
248 | .start = S5PV210_PA_PCM2, | 184 | [1] = DEFINE_RES_DMA(DMACH_PCM2_TX), |
249 | .end = S5PV210_PA_PCM2 + 0x100 - 1, | 185 | [2] = DEFINE_RES_DMA(DMACH_PCM2_RX), |
250 | .flags = IORESOURCE_MEM, | ||
251 | }, | ||
252 | [1] = { | ||
253 | .start = DMACH_PCM2_TX, | ||
254 | .end = DMACH_PCM2_TX, | ||
255 | .flags = IORESOURCE_DMA, | ||
256 | }, | ||
257 | [2] = { | ||
258 | .start = DMACH_PCM2_RX, | ||
259 | .end = DMACH_PCM2_RX, | ||
260 | .flags = IORESOURCE_DMA, | ||
261 | }, | ||
262 | }; | 186 | }; |
263 | 187 | ||
264 | struct platform_device s5pv210_device_pcm2 = { | 188 | struct platform_device s5pv210_device_pcm2 = { |
@@ -279,31 +203,11 @@ static int s5pv210_ac97_cfg_gpio(struct platform_device *pdev) | |||
279 | } | 203 | } |
280 | 204 | ||
281 | static struct resource s5pv210_ac97_resource[] = { | 205 | static struct resource s5pv210_ac97_resource[] = { |
282 | [0] = { | 206 | [0] = DEFINE_RES_MEM(S5PV210_PA_AC97, SZ_256), |
283 | .start = S5PV210_PA_AC97, | 207 | [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT), |
284 | .end = S5PV210_PA_AC97 + 0x100 - 1, | 208 | [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN), |
285 | .flags = IORESOURCE_MEM, | 209 | [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN), |
286 | }, | 210 | [4] = DEFINE_RES_IRQ(IRQ_AC97), |
287 | [1] = { | ||
288 | .start = DMACH_AC97_PCMOUT, | ||
289 | .end = DMACH_AC97_PCMOUT, | ||
290 | .flags = IORESOURCE_DMA, | ||
291 | }, | ||
292 | [2] = { | ||
293 | .start = DMACH_AC97_PCMIN, | ||
294 | .end = DMACH_AC97_PCMIN, | ||
295 | .flags = IORESOURCE_DMA, | ||
296 | }, | ||
297 | [3] = { | ||
298 | .start = DMACH_AC97_MICIN, | ||
299 | .end = DMACH_AC97_MICIN, | ||
300 | .flags = IORESOURCE_DMA, | ||
301 | }, | ||
302 | [4] = { | ||
303 | .start = IRQ_AC97, | ||
304 | .end = IRQ_AC97, | ||
305 | .flags = IORESOURCE_IRQ, | ||
306 | }, | ||
307 | }; | 211 | }; |
308 | 212 | ||
309 | static struct s3c_audio_pdata s3c_ac97_pdata = { | 213 | static struct s3c_audio_pdata s3c_ac97_pdata = { |
@@ -334,16 +238,8 @@ static int s5pv210_spdif_cfg_gpio(struct platform_device *pdev) | |||
334 | } | 238 | } |
335 | 239 | ||
336 | static struct resource s5pv210_spdif_resource[] = { | 240 | static struct resource s5pv210_spdif_resource[] = { |
337 | [0] = { | 241 | [0] = DEFINE_RES_MEM(S5PV210_PA_SPDIF, SZ_256), |
338 | .start = S5PV210_PA_SPDIF, | 242 | [1] = DEFINE_RES_DMA(DMACH_SPDIF), |
339 | .end = S5PV210_PA_SPDIF + 0x100 - 1, | ||
340 | .flags = IORESOURCE_MEM, | ||
341 | }, | ||
342 | [1] = { | ||
343 | .start = DMACH_SPDIF, | ||
344 | .end = DMACH_SPDIF, | ||
345 | .flags = IORESOURCE_DMA, | ||
346 | }, | ||
347 | }; | 243 | }; |
348 | 244 | ||
349 | static struct s3c_audio_pdata samsung_spdif_pdata = { | 245 | static struct s3c_audio_pdata samsung_spdif_pdata = { |