aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf548
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2009-01-07 10:14:39 -0500
committerBryan Wu <cooloney@kernel.org>2009-01-07 10:14:39 -0500
commit42bd8bcb2fa1853fda9c51d956f70bbe2329bdfb (patch)
treeda6e1022ee8e19380444d026dc40e6e989489a85 /arch/blackfin/mach-bf548
parentc0948d3316eaf3fdacc461c2c9e18441022e9e63 (diff)
Blackfin arch: Modify bfin_sir device configuration to board file
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/mach-bf548')
-rw-r--r--arch/blackfin/mach-bf548/boards/cm_bf548.c90
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c90
2 files changed, 164 insertions, 16 deletions
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index d0065c37795e..d063e0f2dbf5 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -187,44 +187,107 @@ static struct platform_device bfin_uart_device = {
187#endif 187#endif
188 188
189#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 189#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
190static struct resource bfin_sir_resources[] = {
191#ifdef CONFIG_BFIN_SIR0 190#ifdef CONFIG_BFIN_SIR0
191static struct resource bfin_sir0_resources[] = {
192 { 192 {
193 .start = 0xFFC00400, 193 .start = 0xFFC00400,
194 .end = 0xFFC004FF, 194 .end = 0xFFC004FF,
195 .flags = IORESOURCE_MEM, 195 .flags = IORESOURCE_MEM,
196 }, 196 },
197 {
198 .start = IRQ_UART0_RX,
199 .end = IRQ_UART0_RX+1,
200 .flags = IORESOURCE_IRQ,
201 },
202 {
203 .start = CH_UART0_RX,
204 .end = CH_UART0_RX+1,
205 .flags = IORESOURCE_DMA,
206 },
207};
208static struct platform_device bfin_sir0_device = {
209 .name = "bfin_sir",
210 .id = 0,
211 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
212 .resource = bfin_sir0_resources,
213};
197#endif 214#endif
198#ifdef CONFIG_BFIN_SIR1 215#ifdef CONFIG_BFIN_SIR1
216static struct resource bfin_sir1_resources[] = {
199 { 217 {
200 .start = 0xFFC02000, 218 .start = 0xFFC02000,
201 .end = 0xFFC020FF, 219 .end = 0xFFC020FF,
202 .flags = IORESOURCE_MEM, 220 .flags = IORESOURCE_MEM,
203 }, 221 },
222 {
223 .start = IRQ_UART1_RX,
224 .end = IRQ_UART1_RX+1,
225 .flags = IORESOURCE_IRQ,
226 },
227 {
228 .start = CH_UART1_RX,
229 .end = CH_UART1_RX+1,
230 .flags = IORESOURCE_DMA,
231 },
232};
233static struct platform_device bfin_sir1_device = {
234 .name = "bfin_sir",
235 .id = 1,
236 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
237 .resource = bfin_sir1_resources,
238};
204#endif 239#endif
205#ifdef CONFIG_BFIN_SIR2 240#ifdef CONFIG_BFIN_SIR2
241static struct resource bfin_sir2_resources[] = {
206 { 242 {
207 .start = 0xFFC02100, 243 .start = 0xFFC02100,
208 .end = 0xFFC021FF, 244 .end = 0xFFC021FF,
209 .flags = IORESOURCE_MEM, 245 .flags = IORESOURCE_MEM,
210 }, 246 },
247 {
248 .start = IRQ_UART2_RX,
249 .end = IRQ_UART2_RX+1,
250 .flags = IORESOURCE_IRQ,
251 },
252 {
253 .start = CH_UART2_RX,
254 .end = CH_UART2_RX+1,
255 .flags = IORESOURCE_DMA,
256 },
257};
258static struct platform_device bfin_sir2_device = {
259 .name = "bfin_sir",
260 .id = 2,
261 .num_resources = ARRAY_SIZE(bfin_sir2_resources),
262 .resource = bfin_sir2_resources,
263};
211#endif 264#endif
212#ifdef CONFIG_BFIN_SIR3 265#ifdef CONFIG_BFIN_SIR3
266static struct resource bfin_sir3_resources[] = {
213 { 267 {
214 .start = 0xFFC03100, 268 .start = 0xFFC03100,
215 .end = 0xFFC031FF, 269 .end = 0xFFC031FF,
216 .flags = IORESOURCE_MEM, 270 .flags = IORESOURCE_MEM,
217 }, 271 },
218#endif 272 {
273 .start = IRQ_UART3_RX,
274 .end = IRQ_UART3_RX+1,
275 .flags = IORESOURCE_IRQ,
276 },
277 {
278 .start = CH_UART3_RX,
279 .end = CH_UART3_RX+1,
280 .flags = IORESOURCE_DMA,
281 },
219}; 282};
220 283static struct platform_device bfin_sir3_device = {
221static struct platform_device bfin_sir_device = {
222 .name = "bfin_sir", 284 .name = "bfin_sir",
223 .id = 0, 285 .id = 3,
224 .num_resources = ARRAY_SIZE(bfin_sir_resources), 286 .num_resources = ARRAY_SIZE(bfin_sir3_resources),
225 .resource = bfin_sir_resources, 287 .resource = bfin_sir3_resources,
226}; 288};
227#endif 289#endif
290#endif
228 291
229#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 292#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
230static struct resource smsc911x_resources[] = { 293static struct resource smsc911x_resources[] = {
@@ -696,7 +759,18 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
696#endif 759#endif
697 760
698#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 761#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
699 &bfin_sir_device, 762#ifdef CONFIG_BFIN_SIR0
763 &bfin_sir0_device,
764#endif
765#ifdef CONFIG_BFIN_SIR1
766 &bfin_sir1_device,
767#endif
768#ifdef CONFIG_BFIN_SIR2
769 &bfin_sir2_device,
770#endif
771#ifdef CONFIG_BFIN_SIR3
772 &bfin_sir3_device,
773#endif
700#endif 774#endif
701 775
702#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 776#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 49fac4c8e610..dae7c1165f16 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -255,44 +255,107 @@ static struct platform_device bfin_uart_device = {
255#endif 255#endif
256 256
257#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 257#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
258static struct resource bfin_sir_resources[] = {
259#ifdef CONFIG_BFIN_SIR0 258#ifdef CONFIG_BFIN_SIR0
259static struct resource bfin_sir0_resources[] = {
260 { 260 {
261 .start = 0xFFC00400, 261 .start = 0xFFC00400,
262 .end = 0xFFC004FF, 262 .end = 0xFFC004FF,
263 .flags = IORESOURCE_MEM, 263 .flags = IORESOURCE_MEM,
264 }, 264 },
265 {
266 .start = IRQ_UART0_RX,
267 .end = IRQ_UART0_RX+1,
268 .flags = IORESOURCE_IRQ,
269 },
270 {
271 .start = CH_UART0_RX,
272 .end = CH_UART0_RX+1,
273 .flags = IORESOURCE_DMA,
274 },
275};
276static struct platform_device bfin_sir0_device = {
277 .name = "bfin_sir",
278 .id = 0,
279 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
280 .resource = bfin_sir0_resources,
281};
265#endif 282#endif
266#ifdef CONFIG_BFIN_SIR1 283#ifdef CONFIG_BFIN_SIR1
284static struct resource bfin_sir1_resources[] = {
267 { 285 {
268 .start = 0xFFC02000, 286 .start = 0xFFC02000,
269 .end = 0xFFC020FF, 287 .end = 0xFFC020FF,
270 .flags = IORESOURCE_MEM, 288 .flags = IORESOURCE_MEM,
271 }, 289 },
290 {
291 .start = IRQ_UART1_RX,
292 .end = IRQ_UART1_RX+1,
293 .flags = IORESOURCE_IRQ,
294 },
295 {
296 .start = CH_UART1_RX,
297 .end = CH_UART1_RX+1,
298 .flags = IORESOURCE_DMA,
299 },
300};
301static struct platform_device bfin_sir1_device = {
302 .name = "bfin_sir",
303 .id = 1,
304 .num_resources = ARRAY_SIZE(bfin_sir1_resources),
305 .resource = bfin_sir1_resources,
306};
272#endif 307#endif
273#ifdef CONFIG_BFIN_SIR2 308#ifdef CONFIG_BFIN_SIR2
309static struct resource bfin_sir2_resources[] = {
274 { 310 {
275 .start = 0xFFC02100, 311 .start = 0xFFC02100,
276 .end = 0xFFC021FF, 312 .end = 0xFFC021FF,
277 .flags = IORESOURCE_MEM, 313 .flags = IORESOURCE_MEM,
278 }, 314 },
315 {
316 .start = IRQ_UART2_RX,
317 .end = IRQ_UART2_RX+1,
318 .flags = IORESOURCE_IRQ,
319 },
320 {
321 .start = CH_UART2_RX,
322 .end = CH_UART2_RX+1,
323 .flags = IORESOURCE_DMA,
324 },
325};
326static struct platform_device bfin_sir2_device = {
327 .name = "bfin_sir",
328 .id = 2,
329 .num_resources = ARRAY_SIZE(bfin_sir2_resources),
330 .resource = bfin_sir2_resources,
331};
279#endif 332#endif
280#ifdef CONFIG_BFIN_SIR3 333#ifdef CONFIG_BFIN_SIR3
334static struct resource bfin_sir3_resources[] = {
281 { 335 {
282 .start = 0xFFC03100, 336 .start = 0xFFC03100,
283 .end = 0xFFC031FF, 337 .end = 0xFFC031FF,
284 .flags = IORESOURCE_MEM, 338 .flags = IORESOURCE_MEM,
285 }, 339 },
286#endif 340 {
341 .start = IRQ_UART3_RX,
342 .end = IRQ_UART3_RX+1,
343 .flags = IORESOURCE_IRQ,
344 },
345 {
346 .start = CH_UART3_RX,
347 .end = CH_UART3_RX+1,
348 .flags = IORESOURCE_DMA,
349 },
287}; 350};
288 351static struct platform_device bfin_sir3_device = {
289static struct platform_device bfin_sir_device = {
290 .name = "bfin_sir", 352 .name = "bfin_sir",
291 .id = 0, 353 .id = 3,
292 .num_resources = ARRAY_SIZE(bfin_sir_resources), 354 .num_resources = ARRAY_SIZE(bfin_sir3_resources),
293 .resource = bfin_sir_resources, 355 .resource = bfin_sir3_resources,
294}; 356};
295#endif 357#endif
358#endif
296 359
297#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 360#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
298static struct resource smsc911x_resources[] = { 361static struct resource smsc911x_resources[] = {
@@ -805,7 +868,18 @@ static struct platform_device *ezkit_devices[] __initdata = {
805#endif 868#endif
806 869
807#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 870#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
808 &bfin_sir_device, 871#ifdef CONFIG_BFIN_SIR0
872 &bfin_sir0_device,
873#endif
874#ifdef CONFIG_BFIN_SIR1
875 &bfin_sir1_device,
876#endif
877#ifdef CONFIG_BFIN_SIR2
878 &bfin_sir2_device,
879#endif
880#ifdef CONFIG_BFIN_SIR3
881 &bfin_sir3_device,
882#endif
809#endif 883#endif
810 884
811#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE) 885#if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)