aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf527/boards/cm_bf527.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/cm_bf527.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/cm_bf527.c')
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c
index 2d93c1f520a2..3543bdf3268e 100644
--- a/arch/blackfin/mach-bf527/boards/cm_bf527.c
+++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c
@@ -800,16 +800,75 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
800}; 800};
801 801
802#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 802#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
803#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
804static struct resource bfin_sport0_uart_resources[] = {
805 {
806 .start = SPORT0_TCR1,
807 .end = SPORT0_MRCS3+4,
808 .flags = IORESOURCE_MEM,
809 },
810 {
811 .start = IRQ_SPORT0_RX,
812 .end = IRQ_SPORT0_RX+1,
813 .flags = IORESOURCE_IRQ,
814 },
815 {
816 .start = IRQ_SPORT0_ERROR,
817 .end = IRQ_SPORT0_ERROR,
818 .flags = IORESOURCE_IRQ,
819 },
820};
821
822unsigned short bfin_sport0_peripherals[] = {
823 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
824 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
825};
826
803static struct platform_device bfin_sport0_uart_device = { 827static struct platform_device bfin_sport0_uart_device = {
804 .name = "bfin-sport-uart", 828 .name = "bfin-sport-uart",
805 .id = 0, 829 .id = 0,
830 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
831 .resource = bfin_sport0_uart_resources,
832 .dev = {
833 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
834 },
835};
836#endif
837#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
838static struct resource bfin_sport1_uart_resources[] = {
839 {
840 .start = SPORT1_TCR1,
841 .end = SPORT1_MRCS3+4,
842 .flags = IORESOURCE_MEM,
843 },
844 {
845 .start = IRQ_SPORT1_RX,
846 .end = IRQ_SPORT1_RX+1,
847 .flags = IORESOURCE_IRQ,
848 },
849 {
850 .start = IRQ_SPORT1_ERROR,
851 .end = IRQ_SPORT1_ERROR,
852 .flags = IORESOURCE_IRQ,
853 },
854};
855
856unsigned short bfin_sport1_peripherals[] = {
857 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
858 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
806}; 859};
807 860
808static struct platform_device bfin_sport1_uart_device = { 861static struct platform_device bfin_sport1_uart_device = {
809 .name = "bfin-sport-uart", 862 .name = "bfin-sport-uart",
810 .id = 1, 863 .id = 1,
864 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
865 .resource = bfin_sport1_uart_resources,
866 .dev = {
867 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
868 },
811}; 869};
812#endif 870#endif
871#endif
813 872
814#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 873#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
815#include <linux/input.h> 874#include <linux/input.h>
@@ -926,9 +985,13 @@ static struct platform_device *cmbf527_devices[] __initdata = {
926#endif 985#endif
927 986
928#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 987#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
988#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
929 &bfin_sport0_uart_device, 989 &bfin_sport0_uart_device,
990#endif
991#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
930 &bfin_sport1_uart_device, 992 &bfin_sport1_uart_device,
931#endif 993#endif
994#endif
932 995
933#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 996#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
934 &bfin_device_gpiokeys, 997 &bfin_device_gpiokeys,