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 | 982300055897609b1b924b9b576fcb2b48021b69 (patch) | |
tree | dc217719de8129040a5192e39535373ccfdea39d /arch | |
parent | 5e9cf65664397bb1a79c627911c48536ac2d2e7d (diff) |
ARM: S5PC100: 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')
-rw-r--r-- | arch/arm/mach-s5pc100/dev-audio.c | 138 |
1 files changed, 23 insertions, 115 deletions
diff --git a/arch/arm/mach-s5pc100/dev-audio.c b/arch/arm/mach-s5pc100/dev-audio.c index ab2d27172cbc..9d4bde3f1110 100644 --- a/arch/arm/mach-s5pc100/dev-audio.c +++ b/arch/arm/mach-s5pc100/dev-audio.c | |||
@@ -56,26 +56,10 @@ static struct s3c_audio_pdata i2sv5_pdata = { | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | static struct resource s5pc100_iis0_resource[] = { | 58 | static struct resource s5pc100_iis0_resource[] = { |
59 | [0] = { | 59 | [0] = DEFINE_RES_MEM(S5PC100_PA_I2S0, SZ_256), |
60 | .start = S5PC100_PA_I2S0, | 60 | [1] = DEFINE_RES_DMA(DMACH_I2S0_TX), |
61 | .end = S5PC100_PA_I2S0 + 0x100 - 1, | 61 | [2] = DEFINE_RES_DMA(DMACH_I2S0_RX), |
62 | .flags = IORESOURCE_MEM, | 62 | [3] = DEFINE_RES_DMA(DMACH_I2S0S_TX), |
63 | }, | ||
64 | [1] = { | ||
65 | .start = DMACH_I2S0_TX, | ||
66 | .end = DMACH_I2S0_TX, | ||
67 | .flags = IORESOURCE_DMA, | ||
68 | }, | ||
69 | [2] = { | ||
70 | .start = DMACH_I2S0_RX, | ||
71 | .end = DMACH_I2S0_RX, | ||
72 | .flags = IORESOURCE_DMA, | ||
73 | }, | ||
74 | [3] = { | ||
75 | .start = DMACH_I2S0S_TX, | ||
76 | .end = DMACH_I2S0S_TX, | ||
77 | .flags = IORESOURCE_DMA, | ||
78 | }, | ||
79 | }; | 63 | }; |
80 | 64 | ||
81 | struct platform_device s5pc100_device_iis0 = { | 65 | struct platform_device s5pc100_device_iis0 = { |
@@ -103,21 +87,9 @@ static struct s3c_audio_pdata i2sv3_pdata = { | |||
103 | }; | 87 | }; |
104 | 88 | ||
105 | static struct resource s5pc100_iis1_resource[] = { | 89 | static struct resource s5pc100_iis1_resource[] = { |
106 | [0] = { | 90 | [0] = DEFINE_RES_MEM(S5PC100_PA_I2S1, SZ_256), |
107 | .start = S5PC100_PA_I2S1, | 91 | [1] = DEFINE_RES_DMA(DMACH_I2S1_TX), |
108 | .end = S5PC100_PA_I2S1 + 0x100 - 1, | 92 | [2] = DEFINE_RES_DMA(DMACH_I2S1_RX), |
109 | .flags = IORESOURCE_MEM, | ||
110 | }, | ||
111 | [1] = { | ||
112 | .start = DMACH_I2S1_TX, | ||
113 | .end = DMACH_I2S1_TX, | ||
114 | .flags = IORESOURCE_DMA, | ||
115 | }, | ||
116 | [2] = { | ||
117 | .start = DMACH_I2S1_RX, | ||
118 | .end = DMACH_I2S1_RX, | ||
119 | .flags = IORESOURCE_DMA, | ||
120 | }, | ||
121 | }; | 93 | }; |
122 | 94 | ||
123 | struct platform_device s5pc100_device_iis1 = { | 95 | struct platform_device s5pc100_device_iis1 = { |
@@ -131,21 +103,9 @@ struct platform_device s5pc100_device_iis1 = { | |||
131 | }; | 103 | }; |
132 | 104 | ||
133 | static struct resource s5pc100_iis2_resource[] = { | 105 | static struct resource s5pc100_iis2_resource[] = { |
134 | [0] = { | 106 | [0] = DEFINE_RES_MEM(S5PC100_PA_I2S2, SZ_256), |
135 | .start = S5PC100_PA_I2S2, | 107 | [1] = DEFINE_RES_DMA(DMACH_I2S2_TX), |
136 | .end = S5PC100_PA_I2S2 + 0x100 - 1, | 108 | [2] = DEFINE_RES_DMA(DMACH_I2S2_RX), |
137 | .flags = IORESOURCE_MEM, | ||
138 | }, | ||
139 | [1] = { | ||
140 | .start = DMACH_I2S2_TX, | ||
141 | .end = DMACH_I2S2_TX, | ||
142 | .flags = IORESOURCE_DMA, | ||
143 | }, | ||
144 | [2] = { | ||
145 | .start = DMACH_I2S2_RX, | ||
146 | .end = DMACH_I2S2_RX, | ||
147 | .flags = IORESOURCE_DMA, | ||
148 | }, | ||
149 | }; | 109 | }; |
150 | 110 | ||
151 | struct platform_device s5pc100_device_iis2 = { | 111 | struct platform_device s5pc100_device_iis2 = { |
@@ -184,21 +144,9 @@ static struct s3c_audio_pdata s3c_pcm_pdata = { | |||
184 | }; | 144 | }; |
185 | 145 | ||
186 | static struct resource s5pc100_pcm0_resource[] = { | 146 | static struct resource s5pc100_pcm0_resource[] = { |
187 | [0] = { | 147 | [0] = DEFINE_RES_MEM(S5PC100_PA_PCM0, SZ_256), |
188 | .start = S5PC100_PA_PCM0, | 148 | [1] = DEFINE_RES_DMA(DMACH_PCM0_TX), |
189 | .end = S5PC100_PA_PCM0 + 0x100 - 1, | 149 | [2] = DEFINE_RES_DMA(DMACH_PCM0_RX), |
190 | .flags = IORESOURCE_MEM, | ||
191 | }, | ||
192 | [1] = { | ||
193 | .start = DMACH_PCM0_TX, | ||
194 | .end = DMACH_PCM0_TX, | ||
195 | .flags = IORESOURCE_DMA, | ||
196 | }, | ||
197 | [2] = { | ||
198 | .start = DMACH_PCM0_RX, | ||
199 | .end = DMACH_PCM0_RX, | ||
200 | .flags = IORESOURCE_DMA, | ||
201 | }, | ||
202 | }; | 150 | }; |
203 | 151 | ||
204 | struct platform_device s5pc100_device_pcm0 = { | 152 | struct platform_device s5pc100_device_pcm0 = { |
@@ -212,21 +160,9 @@ struct platform_device s5pc100_device_pcm0 = { | |||
212 | }; | 160 | }; |
213 | 161 | ||
214 | static struct resource s5pc100_pcm1_resource[] = { | 162 | static struct resource s5pc100_pcm1_resource[] = { |
215 | [0] = { | 163 | [0] = DEFINE_RES_MEM(S5PC100_PA_PCM1, SZ_256), |
216 | .start = S5PC100_PA_PCM1, | 164 | [1] = DEFINE_RES_DMA(DMACH_PCM1_TX), |
217 | .end = S5PC100_PA_PCM1 + 0x100 - 1, | 165 | [2] = DEFINE_RES_DMA(DMACH_PCM1_RX), |
218 | .flags = IORESOURCE_MEM, | ||
219 | }, | ||
220 | [1] = { | ||
221 | .start = DMACH_PCM1_TX, | ||
222 | .end = DMACH_PCM1_TX, | ||
223 | .flags = IORESOURCE_DMA, | ||
224 | }, | ||
225 | [2] = { | ||
226 | .start = DMACH_PCM1_RX, | ||
227 | .end = DMACH_PCM1_RX, | ||
228 | .flags = IORESOURCE_DMA, | ||
229 | }, | ||
230 | }; | 166 | }; |
231 | 167 | ||
232 | struct platform_device s5pc100_device_pcm1 = { | 168 | struct platform_device s5pc100_device_pcm1 = { |
@@ -247,31 +183,11 @@ static int s5pc100_ac97_cfg_gpio(struct platform_device *pdev) | |||
247 | } | 183 | } |
248 | 184 | ||
249 | static struct resource s5pc100_ac97_resource[] = { | 185 | static struct resource s5pc100_ac97_resource[] = { |
250 | [0] = { | 186 | [0] = DEFINE_RES_MEM(S5PC100_PA_AC97, SZ_256), |
251 | .start = S5PC100_PA_AC97, | 187 | [1] = DEFINE_RES_DMA(DMACH_AC97_PCMOUT), |
252 | .end = S5PC100_PA_AC97 + 0x100 - 1, | 188 | [2] = DEFINE_RES_DMA(DMACH_AC97_PCMIN), |
253 | .flags = IORESOURCE_MEM, | 189 | [3] = DEFINE_RES_DMA(DMACH_AC97_MICIN), |
254 | }, | 190 | [4] = DEFINE_RES_IRQ(IRQ_AC97), |
255 | [1] = { | ||
256 | .start = DMACH_AC97_PCMOUT, | ||
257 | .end = DMACH_AC97_PCMOUT, | ||
258 | .flags = IORESOURCE_DMA, | ||
259 | }, | ||
260 | [2] = { | ||
261 | .start = DMACH_AC97_PCMIN, | ||
262 | .end = DMACH_AC97_PCMIN, | ||
263 | .flags = IORESOURCE_DMA, | ||
264 | }, | ||
265 | [3] = { | ||
266 | .start = DMACH_AC97_MICIN, | ||
267 | .end = DMACH_AC97_MICIN, | ||
268 | .flags = IORESOURCE_DMA, | ||
269 | }, | ||
270 | [4] = { | ||
271 | .start = IRQ_AC97, | ||
272 | .end = IRQ_AC97, | ||
273 | .flags = IORESOURCE_IRQ, | ||
274 | }, | ||
275 | }; | 191 | }; |
276 | 192 | ||
277 | static struct s3c_audio_pdata s3c_ac97_pdata = { | 193 | static struct s3c_audio_pdata s3c_ac97_pdata = { |
@@ -308,16 +224,8 @@ static int s5pc100_spdif_cfg_gpg3(struct platform_device *pdev) | |||
308 | } | 224 | } |
309 | 225 | ||
310 | static struct resource s5pc100_spdif_resource[] = { | 226 | static struct resource s5pc100_spdif_resource[] = { |
311 | [0] = { | 227 | [0] = DEFINE_RES_MEM(S5PC100_PA_SPDIF, SZ_256), |
312 | .start = S5PC100_PA_SPDIF, | 228 | [1] = DEFINE_RES_DMA(DMACH_SPDIF), |
313 | .end = S5PC100_PA_SPDIF + 0x100 - 1, | ||
314 | .flags = IORESOURCE_MEM, | ||
315 | }, | ||
316 | [1] = { | ||
317 | .start = DMACH_SPDIF, | ||
318 | .end = DMACH_SPDIF, | ||
319 | .flags = IORESOURCE_DMA, | ||
320 | }, | ||
321 | }; | 229 | }; |
322 | 230 | ||
323 | static struct s3c_audio_pdata s5p_spdif_pdata = { | 231 | static struct s3c_audio_pdata s5p_spdif_pdata = { |