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-bf537/boards/minotaur.c | |
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-bf537/boards/minotaur.c')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/minotaur.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c index 58d6a20e7a0d..6403964490d9 100644 --- a/arch/blackfin/mach-bf537/boards/minotaur.c +++ b/arch/blackfin/mach-bf537/boards/minotaur.c | |||
@@ -377,16 +377,75 @@ static struct platform_device i2c_bfin_twi_device = { | |||
377 | #endif | 377 | #endif |
378 | 378 | ||
379 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 379 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
380 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
381 | static struct resource bfin_sport0_uart_resources[] = { | ||
382 | { | ||
383 | .start = SPORT0_TCR1, | ||
384 | .end = SPORT0_MRCS3+4, | ||
385 | .flags = IORESOURCE_MEM, | ||
386 | }, | ||
387 | { | ||
388 | .start = IRQ_SPORT0_RX, | ||
389 | .end = IRQ_SPORT0_RX+1, | ||
390 | .flags = IORESOURCE_IRQ, | ||
391 | }, | ||
392 | { | ||
393 | .start = IRQ_SPORT0_ERROR, | ||
394 | .end = IRQ_SPORT0_ERROR, | ||
395 | .flags = IORESOURCE_IRQ, | ||
396 | }, | ||
397 | }; | ||
398 | |||
399 | unsigned short bfin_sport0_peripherals[] = { | ||
400 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
401 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
402 | }; | ||
403 | |||
380 | static struct platform_device bfin_sport0_uart_device = { | 404 | static struct platform_device bfin_sport0_uart_device = { |
381 | .name = "bfin-sport-uart", | 405 | .name = "bfin-sport-uart", |
382 | .id = 0, | 406 | .id = 0, |
407 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
408 | .resource = bfin_sport0_uart_resources, | ||
409 | .dev = { | ||
410 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
411 | }, | ||
412 | }; | ||
413 | #endif | ||
414 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
415 | static struct resource bfin_sport1_uart_resources[] = { | ||
416 | { | ||
417 | .start = SPORT1_TCR1, | ||
418 | .end = SPORT1_MRCS3+4, | ||
419 | .flags = IORESOURCE_MEM, | ||
420 | }, | ||
421 | { | ||
422 | .start = IRQ_SPORT1_RX, | ||
423 | .end = IRQ_SPORT1_RX+1, | ||
424 | .flags = IORESOURCE_IRQ, | ||
425 | }, | ||
426 | { | ||
427 | .start = IRQ_SPORT1_ERROR, | ||
428 | .end = IRQ_SPORT1_ERROR, | ||
429 | .flags = IORESOURCE_IRQ, | ||
430 | }, | ||
431 | }; | ||
432 | |||
433 | unsigned short bfin_sport1_peripherals[] = { | ||
434 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
435 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
383 | }; | 436 | }; |
384 | 437 | ||
385 | static struct platform_device bfin_sport1_uart_device = { | 438 | static struct platform_device bfin_sport1_uart_device = { |
386 | .name = "bfin-sport-uart", | 439 | .name = "bfin-sport-uart", |
387 | .id = 1, | 440 | .id = 1, |
441 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
442 | .resource = bfin_sport1_uart_resources, | ||
443 | .dev = { | ||
444 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
445 | }, | ||
388 | }; | 446 | }; |
389 | #endif | 447 | #endif |
448 | #endif | ||
390 | 449 | ||
391 | static struct platform_device *minotaur_devices[] __initdata = { | 450 | static struct platform_device *minotaur_devices[] __initdata = { |
392 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) | 451 | #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE) |
@@ -433,9 +492,13 @@ static struct platform_device *minotaur_devices[] __initdata = { | |||
433 | #endif | 492 | #endif |
434 | 493 | ||
435 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 494 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
495 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
436 | &bfin_sport0_uart_device, | 496 | &bfin_sport0_uart_device, |
497 | #endif | ||
498 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
437 | &bfin_sport1_uart_device, | 499 | &bfin_sport1_uart_device, |
438 | #endif | 500 | #endif |
501 | #endif | ||
439 | 502 | ||
440 | }; | 503 | }; |
441 | 504 | ||