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-bf518 | |
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-bf518')
-rw-r--r-- | arch/blackfin/mach-bf518/boards/ezbrd.c | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index 0d1b021ffa69..06e4316912d3 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c | |||
@@ -562,16 +562,75 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
562 | }; | 562 | }; |
563 | 563 | ||
564 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 564 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
565 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
566 | static struct resource bfin_sport0_uart_resources[] = { | ||
567 | { | ||
568 | .start = SPORT0_TCR1, | ||
569 | .end = SPORT0_MRCS3+4, | ||
570 | .flags = IORESOURCE_MEM, | ||
571 | }, | ||
572 | { | ||
573 | .start = IRQ_SPORT0_RX, | ||
574 | .end = IRQ_SPORT0_RX+1, | ||
575 | .flags = IORESOURCE_IRQ, | ||
576 | }, | ||
577 | { | ||
578 | .start = IRQ_SPORT0_ERROR, | ||
579 | .end = IRQ_SPORT0_ERROR, | ||
580 | .flags = IORESOURCE_IRQ, | ||
581 | }, | ||
582 | }; | ||
583 | |||
584 | unsigned short bfin_sport0_peripherals[] = { | ||
585 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
586 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
587 | }; | ||
588 | |||
565 | static struct platform_device bfin_sport0_uart_device = { | 589 | static struct platform_device bfin_sport0_uart_device = { |
566 | .name = "bfin-sport-uart", | 590 | .name = "bfin-sport-uart", |
567 | .id = 0, | 591 | .id = 0, |
592 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
593 | .resource = bfin_sport0_uart_resources, | ||
594 | .dev = { | ||
595 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
596 | }, | ||
597 | }; | ||
598 | #endif | ||
599 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
600 | static struct resource bfin_sport1_uart_resources[] = { | ||
601 | { | ||
602 | .start = SPORT1_TCR1, | ||
603 | .end = SPORT1_MRCS3+4, | ||
604 | .flags = IORESOURCE_MEM, | ||
605 | }, | ||
606 | { | ||
607 | .start = IRQ_SPORT1_RX, | ||
608 | .end = IRQ_SPORT1_RX+1, | ||
609 | .flags = IORESOURCE_IRQ, | ||
610 | }, | ||
611 | { | ||
612 | .start = IRQ_SPORT1_ERROR, | ||
613 | .end = IRQ_SPORT1_ERROR, | ||
614 | .flags = IORESOURCE_IRQ, | ||
615 | }, | ||
616 | }; | ||
617 | |||
618 | unsigned short bfin_sport1_peripherals[] = { | ||
619 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
620 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
568 | }; | 621 | }; |
569 | 622 | ||
570 | static struct platform_device bfin_sport1_uart_device = { | 623 | static struct platform_device bfin_sport1_uart_device = { |
571 | .name = "bfin-sport-uart", | 624 | .name = "bfin-sport-uart", |
572 | .id = 1, | 625 | .id = 1, |
626 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
627 | .resource = bfin_sport1_uart_resources, | ||
628 | .dev = { | ||
629 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
630 | }, | ||
573 | }; | 631 | }; |
574 | #endif | 632 | #endif |
633 | #endif | ||
575 | 634 | ||
576 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 635 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
577 | #include <linux/input.h> | 636 | #include <linux/input.h> |
@@ -678,9 +737,13 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
678 | #endif | 737 | #endif |
679 | 738 | ||
680 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 739 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
740 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
681 | &bfin_sport0_uart_device, | 741 | &bfin_sport0_uart_device, |
742 | #endif | ||
743 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
682 | &bfin_sport1_uart_device, | 744 | &bfin_sport1_uart_device, |
683 | #endif | 745 | #endif |
746 | #endif | ||
684 | 747 | ||
685 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 748 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
686 | &bfin_device_gpiokeys, | 749 | &bfin_device_gpiokeys, |