aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf527/boards/ezbrd.c
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2009-09-23 01:01:56 -0400
committerMike Frysinger <vapier@gentoo.org>2010-03-09 00:30:45 -0500
commitdf5de261306d9bfc1ed9121595593b10a7626b95 (patch)
tree6bfd86734f017ddcaeb4fc03b0f80819916e64e9 /arch/blackfin/mach-bf527/boards/ezbrd.c
parent08a54bffaf7d5dc9391518323234ce9f9ea4be8e (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-bf527/boards/ezbrd.c')
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c
index 3a981e855668..a99955d11391 100644
--- a/arch/blackfin/mach-bf527/boards/ezbrd.c
+++ b/arch/blackfin/mach-bf527/boards/ezbrd.c
@@ -631,16 +631,75 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
631}; 631};
632 632
633#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 633#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
634#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
635static struct resource bfin_sport0_uart_resources[] = {
636 {
637 .start = SPORT0_TCR1,
638 .end = SPORT0_MRCS3+4,
639 .flags = IORESOURCE_MEM,
640 },
641 {
642 .start = IRQ_SPORT0_RX,
643 .end = IRQ_SPORT0_RX+1,
644 .flags = IORESOURCE_IRQ,
645 },
646 {
647 .start = IRQ_SPORT0_ERROR,
648 .end = IRQ_SPORT0_ERROR,
649 .flags = IORESOURCE_IRQ,
650 },
651};
652
653unsigned short bfin_sport0_peripherals[] = {
654 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
655 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
656};
657
634static struct platform_device bfin_sport0_uart_device = { 658static struct platform_device bfin_sport0_uart_device = {
635 .name = "bfin-sport-uart", 659 .name = "bfin-sport-uart",
636 .id = 0, 660 .id = 0,
661 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
662 .resource = bfin_sport0_uart_resources,
663 .dev = {
664 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
665 },
666};
667#endif
668#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
669static struct resource bfin_sport1_uart_resources[] = {
670 {
671 .start = SPORT1_TCR1,
672 .end = SPORT1_MRCS3+4,
673 .flags = IORESOURCE_MEM,
674 },
675 {
676 .start = IRQ_SPORT1_RX,
677 .end = IRQ_SPORT1_RX+1,
678 .flags = IORESOURCE_IRQ,
679 },
680 {
681 .start = IRQ_SPORT1_ERROR,
682 .end = IRQ_SPORT1_ERROR,
683 .flags = IORESOURCE_IRQ,
684 },
685};
686
687unsigned short bfin_sport1_peripherals[] = {
688 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
689 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
637}; 690};
638 691
639static struct platform_device bfin_sport1_uart_device = { 692static struct platform_device bfin_sport1_uart_device = {
640 .name = "bfin-sport-uart", 693 .name = "bfin-sport-uart",
641 .id = 1, 694 .id = 1,
695 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
696 .resource = bfin_sport1_uart_resources,
697 .dev = {
698 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
699 },
642}; 700};
643#endif 701#endif
702#endif
644 703
645#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 704#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
646#include <linux/input.h> 705#include <linux/input.h>
@@ -766,9 +825,13 @@ static struct platform_device *stamp_devices[] __initdata = {
766#endif 825#endif
767 826
768#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 827#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
828#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
769 &bfin_sport0_uart_device, 829 &bfin_sport0_uart_device,
830#endif
831#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
770 &bfin_sport1_uart_device, 832 &bfin_sport1_uart_device,
771#endif 833#endif
834#endif
772 835
773#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 836#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
774 &bfin_device_gpiokeys, 837 &bfin_device_gpiokeys,