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-bf527 | |
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-bf527')
-rw-r--r-- | arch/blackfin/mach-bf527/boards/cm_bf527.c | 63 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezbrd.c | 63 | ||||
-rw-r--r-- | arch/blackfin/mach-bf527/boards/ezkit.c | 63 |
3 files changed, 189 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 | ||
804 | static 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 | |||
822 | unsigned 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 | |||
803 | static struct platform_device bfin_sport0_uart_device = { | 827 | static 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 | ||
838 | static 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 | |||
856 | unsigned 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 | ||
808 | static struct platform_device bfin_sport1_uart_device = { | 861 | static 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, |
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 | ||
635 | static 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 | |||
653 | unsigned 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 | |||
634 | static struct platform_device bfin_sport0_uart_device = { | 658 | static 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 | ||
669 | static 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 | |||
687 | unsigned 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 | ||
639 | static struct platform_device bfin_sport1_uart_device = { | 692 | static 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, |
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 0750e655fb22..f93323dd5b51 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -844,16 +844,75 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
844 | }; | 844 | }; |
845 | 845 | ||
846 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 846 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
847 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
848 | static struct resource bfin_sport0_uart_resources[] = { | ||
849 | { | ||
850 | .start = SPORT0_TCR1, | ||
851 | .end = SPORT0_MRCS3+4, | ||
852 | .flags = IORESOURCE_MEM, | ||
853 | }, | ||
854 | { | ||
855 | .start = IRQ_SPORT0_RX, | ||
856 | .end = IRQ_SPORT0_RX+1, | ||
857 | .flags = IORESOURCE_IRQ, | ||
858 | }, | ||
859 | { | ||
860 | .start = IRQ_SPORT0_ERROR, | ||
861 | .end = IRQ_SPORT0_ERROR, | ||
862 | .flags = IORESOURCE_IRQ, | ||
863 | }, | ||
864 | }; | ||
865 | |||
866 | unsigned short bfin_sport0_peripherals[] = { | ||
867 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
868 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
869 | }; | ||
870 | |||
847 | static struct platform_device bfin_sport0_uart_device = { | 871 | static struct platform_device bfin_sport0_uart_device = { |
848 | .name = "bfin-sport-uart", | 872 | .name = "bfin-sport-uart", |
849 | .id = 0, | 873 | .id = 0, |
874 | .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources), | ||
875 | .resource = bfin_sport0_uart_resources, | ||
876 | .dev = { | ||
877 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
878 | }, | ||
879 | }; | ||
880 | #endif | ||
881 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
882 | static struct resource bfin_sport1_uart_resources[] = { | ||
883 | { | ||
884 | .start = SPORT1_TCR1, | ||
885 | .end = SPORT1_MRCS3+4, | ||
886 | .flags = IORESOURCE_MEM, | ||
887 | }, | ||
888 | { | ||
889 | .start = IRQ_SPORT1_RX, | ||
890 | .end = IRQ_SPORT1_RX+1, | ||
891 | .flags = IORESOURCE_IRQ, | ||
892 | }, | ||
893 | { | ||
894 | .start = IRQ_SPORT1_ERROR, | ||
895 | .end = IRQ_SPORT1_ERROR, | ||
896 | .flags = IORESOURCE_IRQ, | ||
897 | }, | ||
898 | }; | ||
899 | |||
900 | unsigned short bfin_sport1_peripherals[] = { | ||
901 | P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, | ||
902 | P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0 | ||
850 | }; | 903 | }; |
851 | 904 | ||
852 | static struct platform_device bfin_sport1_uart_device = { | 905 | static struct platform_device bfin_sport1_uart_device = { |
853 | .name = "bfin-sport-uart", | 906 | .name = "bfin-sport-uart", |
854 | .id = 1, | 907 | .id = 1, |
908 | .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources), | ||
909 | .resource = bfin_sport1_uart_resources, | ||
910 | .dev = { | ||
911 | .platform_data = &bfin_sport1_peripherals, /* Passed to driver */ | ||
912 | }, | ||
855 | }; | 913 | }; |
856 | #endif | 914 | #endif |
915 | #endif | ||
857 | 916 | ||
858 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 917 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
859 | #include <linux/input.h> | 918 | #include <linux/input.h> |
@@ -1007,9 +1066,13 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1007 | #endif | 1066 | #endif |
1008 | 1067 | ||
1009 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 1068 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
1069 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | ||
1010 | &bfin_sport0_uart_device, | 1070 | &bfin_sport0_uart_device, |
1071 | #endif | ||
1072 | #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART | ||
1011 | &bfin_sport1_uart_device, | 1073 | &bfin_sport1_uart_device, |
1012 | #endif | 1074 | #endif |
1075 | #endif | ||
1013 | 1076 | ||
1014 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 1077 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
1015 | &bfin_device_gpiokeys, | 1078 | &bfin_device_gpiokeys, |