diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2009-09-23 01:01:56 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-03-09 00:30:45 -0500 |
commit | df5de261306d9bfc1ed9121595593b10a7626b95 (patch) | |
tree | 6bfd86734f017ddcaeb4fc03b0f80819916e64e9 /arch/blackfin/mach-bf533/boards | |
parent | 08a54bffaf7d5dc9391518323234ce9f9ea4be8e (diff) |
Blackfin: move SPORT UART resources to boards files
Rather than keeping the pins in the actual driver and worrying about a
mess of Kconfig options, declare all the desired pin resources in the
boards file. This lets people easily select the specific pins/ports for
the normal emulated UART as well as GPIOs for CTS/RTS.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf533/boards')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/blackstamp.c | 63 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/cm_bf533.c | 63 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/stamp.c | 63 |
3 files changed, 189 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c index 50ce3ecfdcb2..4d9294642f10 100644 --- a/arch/blackfin/mach-bf533/boards/blackstamp.c +++ b/arch/blackfin/mach-bf533/boards/blackstamp.c | |||
@@ -270,16 +270,75 @@ static struct platform_device bfin_sir0_device = { | |||
270 | #endif | 270 | #endif |
271 | 271 | ||
272 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 272 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
273 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
274 | static struct resource bfin_sport0_uart_resources[] = { | ||
275 | { | ||
276 | .start = SPORT0_TCR1, | ||
277 | .end = SPORT0_MRCS3+4, | ||
278 | .flags = IORESOURCE_MEM, | ||
279 | }, | ||
280 | { | ||
281 | .start = IRQ_SPORT0_RX, | ||
282 | .end = IRQ_SPORT0_RX+1, | ||
283 | .flags = IORESOURCE_IRQ, | ||
284 | }, | ||
285 | { | ||
286 | .start = IRQ_SPORT0_ERROR, | ||
287 | .end = IRQ_SPORT0_ERROR, | ||
288 | .flags = IORESOURCE_IRQ, | ||
289 | }, | ||
290 | }; | ||
291 | |||
292 | unsigned short bfin_sport0_peripherals[] = { | ||
293 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
294 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
295 | }; | ||
296 | |||
273 | static struct platform_device bfin_sport0_uart_device = { | 297 | static struct platform_device bfin_sport0_uart_device = { |
274 | .name = "bfin-sport-uart", | 298 | .name = "bfin-sport-uart", |
275 | .id = 0, | 299 | .id = 0, |
300 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
301 | .resource = bfin_sport0_uart_resources, | ||
302 | .dev = { | ||
303 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
304 | }, | ||
305 | }; | ||
306 | #endif | ||
307 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
308 | static struct resource bfin_sport1_uart_resources[] = { | ||
309 | { | ||
310 | .start = SPORT1_TCR1, | ||
311 | .end = SPORT1_MRCS3+4, | ||
312 | .flags = IORESOURCE_MEM, | ||
313 | }, | ||
314 | { | ||
315 | .start = IRQ_SPORT1_RX, | ||
316 | .end = IRQ_SPORT1_RX+1, | ||
317 | .flags = IORESOURCE_IRQ, | ||
318 | }, | ||
319 | { | ||
320 | .start = IRQ_SPORT1_ERROR, | ||
321 | .end = IRQ_SPORT1_ERROR, | ||
322 | .flags = IORESOURCE_IRQ, | ||
323 | }, | ||
324 | }; | ||
325 | |||
326 | unsigned short bfin_sport1_peripherals[] = { | ||
327 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
328 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
276 | }; | 329 | }; |
277 | 330 | ||
278 | static struct platform_device bfin_sport1_uart_device = { | 331 | static struct platform_device bfin_sport1_uart_device = { |
279 | .name = "bfin-sport-uart", | 332 | .name = "bfin-sport-uart", |
280 | .id = 1, | 333 | .id = 1, |
334 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
335 | .resource = bfin_sport1_uart_resources, | ||
336 | .dev = { | ||
337 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
338 | }, | ||
281 | }; | 339 | }; |
282 | #endif | 340 | #endif |
341 | #endif | ||
283 | 342 | ||
284 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 343 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
285 | #include <linux/input.h> | 344 | #include <linux/input.h> |
@@ -385,9 +444,13 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
385 | #endif | 444 | #endif |
386 | 445 | ||
387 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 446 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
447 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
388 | &bfin_sport0_uart_device, | 448 | &bfin_sport0_uart_device, |
449 | #endif | ||
450 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
389 | &bfin_sport1_uart_device, | 451 | &bfin_sport1_uart_device, |
390 | #endif | 452 | #endif |
453 | #endif | ||
391 | 454 | ||
392 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 455 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
393 | &bfin_device_gpiokeys, | 456 | &bfin_device_gpiokeys, |
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c index f707faf8a864..33ff27a4a474 100644 --- a/arch/blackfin/mach-bf533/boards/cm_bf533.c +++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c | |||
@@ -317,16 +317,75 @@ static struct platform_device bfin_sir0_device = { | |||
317 | #endif | 317 | #endif |
318 | 318 | ||
319 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 319 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
320 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
321 | static struct resource bfin_sport0_uart_resources[] = { | ||
322 | { | ||
323 | .start = SPORT0_TCR1, | ||
324 | .end = SPORT0_MRCS3+4, | ||
325 | .flags = IORESOURCE_MEM, | ||
326 | }, | ||
327 | { | ||
328 | .start = IRQ_SPORT0_RX, | ||
329 | .end = IRQ_SPORT0_RX+1, | ||
330 | .flags = IORESOURCE_IRQ, | ||
331 | }, | ||
332 | { | ||
333 | .start = IRQ_SPORT0_ERROR, | ||
334 | .end = IRQ_SPORT0_ERROR, | ||
335 | .flags = IORESOURCE_IRQ, | ||
336 | }, | ||
337 | }; | ||
338 | |||
339 | unsigned short bfin_sport0_peripherals[] = { | ||
340 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
341 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
342 | }; | ||
343 | |||
320 | static struct platform_device bfin_sport0_uart_device = { | 344 | static struct platform_device bfin_sport0_uart_device = { |
321 | .name = "bfin-sport-uart", | 345 | .name = "bfin-sport-uart", |
322 | .id = 0, | 346 | .id = 0, |
347 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
348 | .resource = bfin_sport0_uart_resources, | ||
349 | .dev = { | ||
350 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
351 | }, | ||
352 | }; | ||
353 | #endif | ||
354 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
355 | static struct resource bfin_sport1_uart_resources[] = { | ||
356 | { | ||
357 | .start = SPORT1_TCR1, | ||
358 | .end = SPORT1_MRCS3+4, | ||
359 | .flags = IORESOURCE_MEM, | ||
360 | }, | ||
361 | { | ||
362 | .start = IRQ_SPORT1_RX, | ||
363 | .end = IRQ_SPORT1_RX+1, | ||
364 | .flags = IORESOURCE_IRQ, | ||
365 | }, | ||
366 | { | ||
367 | .start = IRQ_SPORT1_ERROR, | ||
368 | .end = IRQ_SPORT1_ERROR, | ||
369 | .flags = IORESOURCE_IRQ, | ||
370 | }, | ||
371 | }; | ||
372 | |||
373 | unsigned short bfin_sport1_peripherals[] = { | ||
374 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
375 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
323 | }; | 376 | }; |
324 | 377 | ||
325 | static struct platform_device bfin_sport1_uart_device = { | 378 | static struct platform_device bfin_sport1_uart_device = { |
326 | .name = "bfin-sport-uart", | 379 | .name = "bfin-sport-uart", |
327 | .id = 1, | 380 | .id = 1, |
381 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
382 | .resource = bfin_sport1_uart_resources, | ||
383 | .dev = { | ||
384 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
385 | }, | ||
328 | }; | 386 | }; |
329 | #endif | 387 | #endif |
388 | #endif | ||
330 | 389 | ||
331 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 390 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
332 | static struct resource isp1362_hcd_resources[] = { | 391 | static struct resource isp1362_hcd_resources[] = { |
@@ -473,9 +532,13 @@ static struct platform_device *cm_bf533_devices[] __initdata = { | |||
473 | #endif | 532 | #endif |
474 | 533 | ||
475 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 534 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
535 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
476 | &bfin_sport0_uart_device, | 536 | &bfin_sport0_uart_device, |
537 | #endif | ||
538 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
477 | &bfin_sport1_uart_device, | 539 | &bfin_sport1_uart_device, |
478 | #endif | 540 | #endif |
541 | #endif | ||
479 | 542 | ||
480 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 543 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
481 | &rtc_device, | 544 | &rtc_device, |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 2683e5f2294f..428f724dd080 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -397,16 +397,75 @@ static struct platform_device bfin_sir0_device = { | |||
397 | #endif | 397 | #endif |
398 | 398 | ||
399 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 399 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
400 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
401 | static struct resource bfin_sport0_uart_resources[] = { | ||
402 | { | ||
403 | .start = SPORT0_TCR1, | ||
404 | .end = SPORT0_MRCS3+4, | ||
405 | .flags = IORESOURCE_MEM, | ||
406 | }, | ||
407 | { | ||
408 | .start = IRQ_SPORT0_RX, | ||
409 | .end = IRQ_SPORT0_RX+1, | ||
410 | .flags = IORESOURCE_IRQ, | ||
411 | }, | ||
412 | { | ||
413 | .start = IRQ_SPORT0_ERROR, | ||
414 | .end = IRQ_SPORT0_ERROR, | ||
415 | .flags = IORESOURCE_IRQ, | ||
416 | }, | ||
417 | }; | ||
418 | |||
419 | unsigned short bfin_sport0_peripherals[] = { | ||
420 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
421 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
422 | }; | ||
423 | |||
400 | static struct platform_device bfin_sport0_uart_device = { | 424 | static struct platform_device bfin_sport0_uart_device = { |
401 | .name = "bfin-sport-uart", | 425 | .name = "bfin-sport-uart", |
402 | .id = 0, | 426 | .id = 0, |
427 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
428 | .resource = bfin_sport0_uart_resources, | ||
429 | .dev = { | ||
430 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
431 | }, | ||
432 | }; | ||
433 | #endif | ||
434 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
435 | static struct resource bfin_sport1_uart_resources[] = { | ||
436 | { | ||
437 | .start = SPORT1_TCR1, | ||
438 | .end = SPORT1_MRCS3+4, | ||
439 | .flags = IORESOURCE_MEM, | ||
440 | }, | ||
441 | { | ||
442 | .start = IRQ_SPORT1_RX, | ||
443 | .end = IRQ_SPORT1_RX+1, | ||
444 | .flags = IORESOURCE_IRQ, | ||
445 | }, | ||
446 | { | ||
447 | .start = IRQ_SPORT1_ERROR, | ||
448 | .end = IRQ_SPORT1_ERROR, | ||
449 | .flags = IORESOURCE_IRQ, | ||
450 | }, | ||
451 | }; | ||
452 | |||
453 | unsigned short bfin_sport1_peripherals[] = { | ||
454 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
455 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
403 | }; | 456 | }; |
404 | 457 | ||
405 | static struct platform_device bfin_sport1_uart_device = { | 458 | static struct platform_device bfin_sport1_uart_device = { |
406 | .name = "bfin-sport-uart", | 459 | .name = "bfin-sport-uart", |
407 | .id = 1, | 460 | .id = 1, |
461 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
462 | .resource = bfin_sport1_uart_resources, | ||
463 | .dev = { | ||
464 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
465 | }, | ||
408 | }; | 466 | }; |
409 | #endif | 467 | #endif |
468 | #endif | ||
410 | 469 | ||
411 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 470 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
412 | #include <linux/input.h> | 471 | #include <linux/input.h> |
@@ -536,9 +595,13 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
536 | #endif | 595 | #endif |
537 | 596 | ||
538 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 597 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
598 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
539 | &bfin_sport0_uart_device, | 599 | &bfin_sport0_uart_device, |
600 | #endif | ||
601 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
540 | &bfin_sport1_uart_device, | 602 | &bfin_sport1_uart_device, |
541 | #endif | 603 | #endif |
604 | #endif | ||
542 | 605 | ||
543 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 606 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
544 | &bfin_device_gpiokeys, | 607 | &bfin_device_gpiokeys, |