aboutsummaryrefslogtreecommitdiffstats
path: root/arch
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
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')
-rw-r--r--arch/blackfin/mach-bf518/boards/ezbrd.c63
-rw-r--r--arch/blackfin/mach-bf527/boards/cm_bf527.c63
-rw-r--r--arch/blackfin/mach-bf527/boards/ezbrd.c63
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c63
-rw-r--r--arch/blackfin/mach-bf533/boards/blackstamp.c63
-rw-r--r--arch/blackfin/mach-bf533/boards/cm_bf533.c63
-rw-r--r--arch/blackfin/mach-bf533/boards/stamp.c63
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537e.c63
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537u.c63
-rw-r--r--arch/blackfin/mach-bf537/boards/minotaur.c63
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c67
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c63
-rw-r--r--arch/blackfin/mach-bf538/boards/ezkit.c154
-rw-r--r--arch/blackfin/mach-bf548/boards/cm_bf548.c154
-rw-r--r--arch/blackfin/mach-bf548/boards/ezkit.c154
15 files changed, 1220 insertions, 2 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
566static 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
584unsigned 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
565static struct platform_device bfin_sport0_uart_device = { 589static 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
600static 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
618unsigned 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
570static struct platform_device bfin_sport1_uart_device = { 623static 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,
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,
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,
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
848static 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
866unsigned 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
847static struct platform_device bfin_sport0_uart_device = { 871static 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
882static 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
900unsigned 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
852static struct platform_device bfin_sport1_uart_device = { 905static 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,
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c
index 50ce3ecfdcb2..4d9294642f10 100644
--- a/arch/blackfin/mach-bf533/boards/blackstamp.c
+++ b/arch/blackfin/mach-bf533/boards/blackstamp.c
@@ -270,16 +270,75 @@ static struct platform_device bfin_sir0_device = {
270#endif 270#endif
271 271
272#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 272#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
273#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
274static struct resource bfin_sport0_uart_resources[] = {
275 {
276 .start = SPORT0_TCR1,
277 .end = SPORT0_MRCS3+4,
278 .flags = IORESOURCE_MEM,
279 },
280 {
281 .start = IRQ_SPORT0_RX,
282 .end = IRQ_SPORT0_RX+1,
283 .flags = IORESOURCE_IRQ,
284 },
285 {
286 .start = IRQ_SPORT0_ERROR,
287 .end = IRQ_SPORT0_ERROR,
288 .flags = IORESOURCE_IRQ,
289 },
290};
291
292unsigned short bfin_sport0_peripherals[] = {
293 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
294 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
295};
296
273static struct platform_device bfin_sport0_uart_device = { 297static struct platform_device bfin_sport0_uart_device = {
274 .name = "bfin-sport-uart", 298 .name = "bfin-sport-uart",
275 .id = 0, 299 .id = 0,
300 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
301 .resource = bfin_sport0_uart_resources,
302 .dev = {
303 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
304 },
305};
306#endif
307#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
308static struct resource bfin_sport1_uart_resources[] = {
309 {
310 .start = SPORT1_TCR1,
311 .end = SPORT1_MRCS3+4,
312 .flags = IORESOURCE_MEM,
313 },
314 {
315 .start = IRQ_SPORT1_RX,
316 .end = IRQ_SPORT1_RX+1,
317 .flags = IORESOURCE_IRQ,
318 },
319 {
320 .start = IRQ_SPORT1_ERROR,
321 .end = IRQ_SPORT1_ERROR,
322 .flags = IORESOURCE_IRQ,
323 },
324};
325
326unsigned short bfin_sport1_peripherals[] = {
327 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
328 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
276}; 329};
277 330
278static struct platform_device bfin_sport1_uart_device = { 331static struct platform_device bfin_sport1_uart_device = {
279 .name = "bfin-sport-uart", 332 .name = "bfin-sport-uart",
280 .id = 1, 333 .id = 1,
334 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
335 .resource = bfin_sport1_uart_resources,
336 .dev = {
337 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
338 },
281}; 339};
282#endif 340#endif
341#endif
283 342
284#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 343#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
285#include <linux/input.h> 344#include <linux/input.h>
@@ -385,9 +444,13 @@ static struct platform_device *stamp_devices[] __initdata = {
385#endif 444#endif
386 445
387#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 446#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
447#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
388 &bfin_sport0_uart_device, 448 &bfin_sport0_uart_device,
449#endif
450#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
389 &bfin_sport1_uart_device, 451 &bfin_sport1_uart_device,
390#endif 452#endif
453#endif
391 454
392#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 455#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
393 &bfin_device_gpiokeys, 456 &bfin_device_gpiokeys,
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c
index f707faf8a864..33ff27a4a474 100644
--- a/arch/blackfin/mach-bf533/boards/cm_bf533.c
+++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c
@@ -317,16 +317,75 @@ static struct platform_device bfin_sir0_device = {
317#endif 317#endif
318 318
319#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 319#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
320#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
321static struct resource bfin_sport0_uart_resources[] = {
322 {
323 .start = SPORT0_TCR1,
324 .end = SPORT0_MRCS3+4,
325 .flags = IORESOURCE_MEM,
326 },
327 {
328 .start = IRQ_SPORT0_RX,
329 .end = IRQ_SPORT0_RX+1,
330 .flags = IORESOURCE_IRQ,
331 },
332 {
333 .start = IRQ_SPORT0_ERROR,
334 .end = IRQ_SPORT0_ERROR,
335 .flags = IORESOURCE_IRQ,
336 },
337};
338
339unsigned short bfin_sport0_peripherals[] = {
340 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
341 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
342};
343
320static struct platform_device bfin_sport0_uart_device = { 344static struct platform_device bfin_sport0_uart_device = {
321 .name = "bfin-sport-uart", 345 .name = "bfin-sport-uart",
322 .id = 0, 346 .id = 0,
347 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
348 .resource = bfin_sport0_uart_resources,
349 .dev = {
350 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
351 },
352};
353#endif
354#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
355static struct resource bfin_sport1_uart_resources[] = {
356 {
357 .start = SPORT1_TCR1,
358 .end = SPORT1_MRCS3+4,
359 .flags = IORESOURCE_MEM,
360 },
361 {
362 .start = IRQ_SPORT1_RX,
363 .end = IRQ_SPORT1_RX+1,
364 .flags = IORESOURCE_IRQ,
365 },
366 {
367 .start = IRQ_SPORT1_ERROR,
368 .end = IRQ_SPORT1_ERROR,
369 .flags = IORESOURCE_IRQ,
370 },
371};
372
373unsigned short bfin_sport1_peripherals[] = {
374 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
375 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
323}; 376};
324 377
325static struct platform_device bfin_sport1_uart_device = { 378static struct platform_device bfin_sport1_uart_device = {
326 .name = "bfin-sport-uart", 379 .name = "bfin-sport-uart",
327 .id = 1, 380 .id = 1,
381 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
382 .resource = bfin_sport1_uart_resources,
383 .dev = {
384 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
385 },
328}; 386};
329#endif 387#endif
388#endif
330 389
331#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 390#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
332static struct resource isp1362_hcd_resources[] = { 391static struct resource isp1362_hcd_resources[] = {
@@ -473,9 +532,13 @@ static struct platform_device *cm_bf533_devices[] __initdata = {
473#endif 532#endif
474 533
475#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 534#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
535#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
476 &bfin_sport0_uart_device, 536 &bfin_sport0_uart_device,
537#endif
538#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
477 &bfin_sport1_uart_device, 539 &bfin_sport1_uart_device,
478#endif 540#endif
541#endif
479 542
480#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 543#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
481 &rtc_device, 544 &rtc_device,
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c
index 2683e5f2294f..428f724dd080 100644
--- a/arch/blackfin/mach-bf533/boards/stamp.c
+++ b/arch/blackfin/mach-bf533/boards/stamp.c
@@ -397,16 +397,75 @@ static struct platform_device bfin_sir0_device = {
397#endif 397#endif
398 398
399#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 399#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
400#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
401static struct resource bfin_sport0_uart_resources[] = {
402 {
403 .start = SPORT0_TCR1,
404 .end = SPORT0_MRCS3+4,
405 .flags = IORESOURCE_MEM,
406 },
407 {
408 .start = IRQ_SPORT0_RX,
409 .end = IRQ_SPORT0_RX+1,
410 .flags = IORESOURCE_IRQ,
411 },
412 {
413 .start = IRQ_SPORT0_ERROR,
414 .end = IRQ_SPORT0_ERROR,
415 .flags = IORESOURCE_IRQ,
416 },
417};
418
419unsigned short bfin_sport0_peripherals[] = {
420 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
421 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
422};
423
400static struct platform_device bfin_sport0_uart_device = { 424static struct platform_device bfin_sport0_uart_device = {
401 .name = "bfin-sport-uart", 425 .name = "bfin-sport-uart",
402 .id = 0, 426 .id = 0,
427 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
428 .resource = bfin_sport0_uart_resources,
429 .dev = {
430 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
431 },
432};
433#endif
434#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
435static struct resource bfin_sport1_uart_resources[] = {
436 {
437 .start = SPORT1_TCR1,
438 .end = SPORT1_MRCS3+4,
439 .flags = IORESOURCE_MEM,
440 },
441 {
442 .start = IRQ_SPORT1_RX,
443 .end = IRQ_SPORT1_RX+1,
444 .flags = IORESOURCE_IRQ,
445 },
446 {
447 .start = IRQ_SPORT1_ERROR,
448 .end = IRQ_SPORT1_ERROR,
449 .flags = IORESOURCE_IRQ,
450 },
451};
452
453unsigned short bfin_sport1_peripherals[] = {
454 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
455 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
403}; 456};
404 457
405static struct platform_device bfin_sport1_uart_device = { 458static struct platform_device bfin_sport1_uart_device = {
406 .name = "bfin-sport-uart", 459 .name = "bfin-sport-uart",
407 .id = 1, 460 .id = 1,
461 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
462 .resource = bfin_sport1_uart_resources,
463 .dev = {
464 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
465 },
408}; 466};
409#endif 467#endif
468#endif
410 469
411#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 470#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
412#include <linux/input.h> 471#include <linux/input.h>
@@ -536,9 +595,13 @@ static struct platform_device *stamp_devices[] __initdata = {
536#endif 595#endif
537 596
538#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 597#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
598#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
539 &bfin_sport0_uart_device, 599 &bfin_sport0_uart_device,
600#endif
601#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
540 &bfin_sport1_uart_device, 602 &bfin_sport1_uart_device,
541#endif 603#endif
604#endif
542 605
543#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 606#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
544 &bfin_device_gpiokeys, 607 &bfin_device_gpiokeys,
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index abb32ddc5122..b4837776b274 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -526,16 +526,75 @@ static struct platform_device i2c_bfin_twi_device = {
526#endif 526#endif
527 527
528#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 528#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
529#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
530static struct resource bfin_sport0_uart_resources[] = {
531 {
532 .start = SPORT0_TCR1,
533 .end = SPORT0_MRCS3+4,
534 .flags = IORESOURCE_MEM,
535 },
536 {
537 .start = IRQ_SPORT0_RX,
538 .end = IRQ_SPORT0_RX+1,
539 .flags = IORESOURCE_IRQ,
540 },
541 {
542 .start = IRQ_SPORT0_ERROR,
543 .end = IRQ_SPORT0_ERROR,
544 .flags = IORESOURCE_IRQ,
545 },
546};
547
548unsigned short bfin_sport0_peripherals[] = {
549 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
550 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
551};
552
529static struct platform_device bfin_sport0_uart_device = { 553static struct platform_device bfin_sport0_uart_device = {
530 .name = "bfin-sport-uart", 554 .name = "bfin-sport-uart",
531 .id = 0, 555 .id = 0,
556 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
557 .resource = bfin_sport0_uart_resources,
558 .dev = {
559 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
560 },
561};
562#endif
563#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
564static struct resource bfin_sport1_uart_resources[] = {
565 {
566 .start = SPORT1_TCR1,
567 .end = SPORT1_MRCS3+4,
568 .flags = IORESOURCE_MEM,
569 },
570 {
571 .start = IRQ_SPORT1_RX,
572 .end = IRQ_SPORT1_RX+1,
573 .flags = IORESOURCE_IRQ,
574 },
575 {
576 .start = IRQ_SPORT1_ERROR,
577 .end = IRQ_SPORT1_ERROR,
578 .flags = IORESOURCE_IRQ,
579 },
580};
581
582unsigned short bfin_sport1_peripherals[] = {
583 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
584 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
532}; 585};
533 586
534static struct platform_device bfin_sport1_uart_device = { 587static struct platform_device bfin_sport1_uart_device = {
535 .name = "bfin-sport-uart", 588 .name = "bfin-sport-uart",
536 .id = 1, 589 .id = 1,
590 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
591 .resource = bfin_sport1_uart_resources,
592 .dev = {
593 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
594 },
537}; 595};
538#endif 596#endif
597#endif
539 598
540#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 599#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
541static struct platform_device bfin_mii_bus = { 600static struct platform_device bfin_mii_bus = {
@@ -647,9 +706,13 @@ static struct platform_device *cm_bf537e_devices[] __initdata = {
647#endif 706#endif
648 707
649#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 708#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
709#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
650 &bfin_sport0_uart_device, 710 &bfin_sport0_uart_device,
711#endif
712#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
651 &bfin_sport1_uart_device, 713 &bfin_sport1_uart_device,
652#endif 714#endif
715#endif
653 716
654#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 717#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
655 &isp1362_hcd_device, 718 &isp1362_hcd_device,
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index b3182face957..c6802be65fb1 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -491,16 +491,75 @@ static struct platform_device i2c_bfin_twi_device = {
491#endif 491#endif
492 492
493#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 493#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
494#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
495static struct resource bfin_sport0_uart_resources[] = {
496 {
497 .start = SPORT0_TCR1,
498 .end = SPORT0_MRCS3+4,
499 .flags = IORESOURCE_MEM,
500 },
501 {
502 .start = IRQ_SPORT0_RX,
503 .end = IRQ_SPORT0_RX+1,
504 .flags = IORESOURCE_IRQ,
505 },
506 {
507 .start = IRQ_SPORT0_ERROR,
508 .end = IRQ_SPORT0_ERROR,
509 .flags = IORESOURCE_IRQ,
510 },
511};
512
513unsigned short bfin_sport0_peripherals[] = {
514 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
515 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
516};
517
494static struct platform_device bfin_sport0_uart_device = { 518static struct platform_device bfin_sport0_uart_device = {
495 .name = "bfin-sport-uart", 519 .name = "bfin-sport-uart",
496 .id = 0, 520 .id = 0,
521 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
522 .resource = bfin_sport0_uart_resources,
523 .dev = {
524 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
525 },
526};
527#endif
528#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
529static struct resource bfin_sport1_uart_resources[] = {
530 {
531 .start = SPORT1_TCR1,
532 .end = SPORT1_MRCS3+4,
533 .flags = IORESOURCE_MEM,
534 },
535 {
536 .start = IRQ_SPORT1_RX,
537 .end = IRQ_SPORT1_RX+1,
538 .flags = IORESOURCE_IRQ,
539 },
540 {
541 .start = IRQ_SPORT1_ERROR,
542 .end = IRQ_SPORT1_ERROR,
543 .flags = IORESOURCE_IRQ,
544 },
545};
546
547unsigned short bfin_sport1_peripherals[] = {
548 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
549 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
497}; 550};
498 551
499static struct platform_device bfin_sport1_uart_device = { 552static struct platform_device bfin_sport1_uart_device = {
500 .name = "bfin-sport-uart", 553 .name = "bfin-sport-uart",
501 .id = 1, 554 .id = 1,
555 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
556 .resource = bfin_sport1_uart_resources,
557 .dev = {
558 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
559 },
502}; 560};
503#endif 561#endif
562#endif
504 563
505#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 564#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
506static struct platform_device bfin_mii_bus = { 565static struct platform_device bfin_mii_bus = {
@@ -612,9 +671,13 @@ static struct platform_device *cm_bf537u_devices[] __initdata = {
612#endif 671#endif
613 672
614#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 673#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
674#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
615 &bfin_sport0_uart_device, 675 &bfin_sport0_uart_device,
676#endif
677#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
616 &bfin_sport1_uart_device, 678 &bfin_sport1_uart_device,
617#endif 679#endif
680#endif
618 681
619#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 682#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
620 &isp1362_hcd_device, 683 &isp1362_hcd_device,
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
381static 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
399unsigned 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
380static struct platform_device bfin_sport0_uart_device = { 404static 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
415static 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
433unsigned 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
385static struct platform_device bfin_sport1_uart_device = { 438static 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
391static struct platform_device *minotaur_devices[] __initdata = { 450static 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
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 554f82d6f9da..df4b6b5c08d4 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -1677,16 +1677,75 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = {
1677}; 1677};
1678 1678
1679#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1679#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1680#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1681static struct resource bfin_sport0_uart_resources[] = {
1682 {
1683 .start = SPORT0_TCR1,
1684 .end = SPORT0_MRCS3+4,
1685 .flags = IORESOURCE_MEM,
1686 },
1687 {
1688 .start = IRQ_SPORT0_RX,
1689 .end = IRQ_SPORT0_RX+1,
1690 .flags = IORESOURCE_IRQ,
1691 },
1692 {
1693 .start = IRQ_SPORT0_ERROR,
1694 .end = IRQ_SPORT0_ERROR,
1695 .flags = IORESOURCE_IRQ,
1696 },
1697};
1698
1699unsigned short bfin_sport0_peripherals[] = {
1700 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
1701 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
1702};
1703
1680static struct platform_device bfin_sport0_uart_device = { 1704static struct platform_device bfin_sport0_uart_device = {
1681 .name = "bfin-sport-uart", 1705 .name = "bfin-sport-uart",
1682 .id = 0, 1706 .id = 0,
1707 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
1708 .resource = bfin_sport0_uart_resources,
1709 .dev = {
1710 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
1711 },
1712};
1713#endif
1714#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1715static struct resource bfin_sport1_uart_resources[] = {
1716 {
1717 .start = SPORT1_TCR1,
1718 .end = SPORT1_MRCS3+4,
1719 .flags = IORESOURCE_MEM,
1720 },
1721 {
1722 .start = IRQ_SPORT1_RX,
1723 .end = IRQ_SPORT1_RX+1,
1724 .flags = IORESOURCE_IRQ,
1725 },
1726 {
1727 .start = IRQ_SPORT1_ERROR,
1728 .end = IRQ_SPORT1_ERROR,
1729 .flags = IORESOURCE_IRQ,
1730 },
1731};
1732
1733unsigned short bfin_sport1_peripherals[] = {
1734 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
1735 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
1683}; 1736};
1684 1737
1685static struct platform_device bfin_sport1_uart_device = { 1738static struct platform_device bfin_sport1_uart_device = {
1686 .name = "bfin-sport-uart", 1739 .name = "bfin-sport-uart",
1687 .id = 1, 1740 .id = 1,
1741 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
1742 .resource = bfin_sport1_uart_resources,
1743 .dev = {
1744 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
1745 },
1688}; 1746};
1689#endif 1747#endif
1748#endif
1690 1749
1691#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 1750#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1692#define CF_IDE_NAND_CARD_USE_HDD_INTERFACE 1751#define CF_IDE_NAND_CARD_USE_HDD_INTERFACE
@@ -1867,9 +1926,13 @@ static struct platform_device *stamp_devices[] __initdata = {
1867#endif 1926#endif
1868 1927
1869#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 1928#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1929#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1870 &bfin_sport0_uart_device, 1930 &bfin_sport0_uart_device,
1931#endif
1932#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1871 &bfin_sport1_uart_device, 1933 &bfin_sport1_uart_device,
1872#endif 1934#endif
1935#endif
1873 1936
1874#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) 1937#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
1875 &bfin_pata_device, 1938 &bfin_pata_device,
@@ -1895,10 +1958,10 @@ static struct platform_device *stamp_devices[] __initdata = {
1895static int __init stamp_init(void) 1958static int __init stamp_init(void)
1896{ 1959{
1897 printk(KERN_INFO "%s(): registering device resources\n", __func__); 1960 printk(KERN_INFO "%s(): registering device resources\n", __func__);
1898 i2c_register_board_info(0, bfin_i2c_board_info,
1899 ARRAY_SIZE(bfin_i2c_board_info));
1900 bfin_plat_nand_init(); 1961 bfin_plat_nand_init();
1901 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); 1962 platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
1963 i2c_register_board_info(0, bfin_i2c_board_info,
1964 ARRAY_SIZE(bfin_i2c_board_info));
1902 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); 1965 spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
1903 1966
1904 return 0; 1967 return 0;
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index d77ca5b75685..69a2fb804724 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -493,16 +493,75 @@ static struct platform_device i2c_bfin_twi_device = {
493#endif 493#endif
494 494
495#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 495#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
496#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
497static struct resource bfin_sport0_uart_resources[] = {
498 {
499 .start = SPORT0_TCR1,
500 .end = SPORT0_MRCS3+4,
501 .flags = IORESOURCE_MEM,
502 },
503 {
504 .start = IRQ_SPORT0_RX,
505 .end = IRQ_SPORT0_RX+1,
506 .flags = IORESOURCE_IRQ,
507 },
508 {
509 .start = IRQ_SPORT0_ERROR,
510 .end = IRQ_SPORT0_ERROR,
511 .flags = IORESOURCE_IRQ,
512 },
513};
514
515unsigned short bfin_sport0_peripherals[] = {
516 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
517 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
518};
519
496static struct platform_device bfin_sport0_uart_device = { 520static struct platform_device bfin_sport0_uart_device = {
497 .name = "bfin-sport-uart", 521 .name = "bfin-sport-uart",
498 .id = 0, 522 .id = 0,
523 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
524 .resource = bfin_sport0_uart_resources,
525 .dev = {
526 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
527 },
528};
529#endif
530#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
531static struct resource bfin_sport1_uart_resources[] = {
532 {
533 .start = SPORT1_TCR1,
534 .end = SPORT1_MRCS3+4,
535 .flags = IORESOURCE_MEM,
536 },
537 {
538 .start = IRQ_SPORT1_RX,
539 .end = IRQ_SPORT1_RX+1,
540 .flags = IORESOURCE_IRQ,
541 },
542 {
543 .start = IRQ_SPORT1_ERROR,
544 .end = IRQ_SPORT1_ERROR,
545 .flags = IORESOURCE_IRQ,
546 },
547};
548
549unsigned short bfin_sport1_peripherals[] = {
550 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
551 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
499}; 552};
500 553
501static struct platform_device bfin_sport1_uart_device = { 554static struct platform_device bfin_sport1_uart_device = {
502 .name = "bfin-sport-uart", 555 .name = "bfin-sport-uart",
503 .id = 1, 556 .id = 1,
557 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
558 .resource = bfin_sport1_uart_resources,
559 .dev = {
560 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
561 },
504}; 562};
505#endif 563#endif
564#endif
506 565
507#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 566#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
508static struct platform_device bfin_mii_bus = { 567static struct platform_device bfin_mii_bus = {
@@ -614,9 +673,13 @@ static struct platform_device *cm_bf537_devices[] __initdata = {
614#endif 673#endif
615 674
616#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) 675#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
676#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
617 &bfin_sport0_uart_device, 677 &bfin_sport0_uart_device,
678#endif
679#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
618 &bfin_sport1_uart_device, 680 &bfin_sport1_uart_device,
619#endif 681#endif
682#endif
620 683
621#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) 684#if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
622 &isp1362_hcd_device, 685 &isp1362_hcd_device,
diff --git a/arch/blackfin/mach-bf538/boards/ezkit.c b/arch/blackfin/mach-bf538/boards/ezkit.c
index 1912bc4555aa..d7c6b9f18b5e 100644
--- a/arch/blackfin/mach-bf538/boards/ezkit.c
+++ b/arch/blackfin/mach-bf538/boards/ezkit.c
@@ -262,6 +262,145 @@ static struct platform_device bfin_sir2_device = {
262#endif 262#endif
263#endif 263#endif
264 264
265#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
266#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
267static struct resource bfin_sport0_uart_resources[] = {
268 {
269 .start = SPORT0_TCR1,
270 .end = SPORT0_MRCS3+4,
271 .flags = IORESOURCE_MEM,
272 },
273 {
274 .start = IRQ_SPORT0_RX,
275 .end = IRQ_SPORT0_RX+1,
276 .flags = IORESOURCE_IRQ,
277 },
278 {
279 .start = IRQ_SPORT0_ERROR,
280 .end = IRQ_SPORT0_ERROR,
281 .flags = IORESOURCE_IRQ,
282 },
283};
284
285unsigned short bfin_sport0_peripherals[] = {
286 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
287 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
288};
289
290static struct platform_device bfin_sport0_uart_device = {
291 .name = "bfin-sport-uart",
292 .id = 0,
293 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
294 .resource = bfin_sport0_uart_resources,
295 .dev = {
296 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
297 },
298};
299#endif
300#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
301static struct resource bfin_sport1_uart_resources[] = {
302 {
303 .start = SPORT1_TCR1,
304 .end = SPORT1_MRCS3+4,
305 .flags = IORESOURCE_MEM,
306 },
307 {
308 .start = IRQ_SPORT1_RX,
309 .end = IRQ_SPORT1_RX+1,
310 .flags = IORESOURCE_IRQ,
311 },
312 {
313 .start = IRQ_SPORT1_ERROR,
314 .end = IRQ_SPORT1_ERROR,
315 .flags = IORESOURCE_IRQ,
316 },
317};
318
319unsigned short bfin_sport1_peripherals[] = {
320 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
321 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
322};
323
324static struct platform_device bfin_sport1_uart_device = {
325 .name = "bfin-sport-uart",
326 .id = 1,
327 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
328 .resource = bfin_sport1_uart_resources,
329 .dev = {
330 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
331 },
332};
333#endif
334#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
335static struct resource bfin_sport2_uart_resources[] = {
336 {
337 .start = SPORT2_TCR1,
338 .end = SPORT2_MRCS3+4,
339 .flags = IORESOURCE_MEM,
340 },
341 {
342 .start = IRQ_SPORT2_RX,
343 .end = IRQ_SPORT2_RX+1,
344 .flags = IORESOURCE_IRQ,
345 },
346 {
347 .start = IRQ_SPORT2_ERROR,
348 .end = IRQ_SPORT2_ERROR,
349 .flags = IORESOURCE_IRQ,
350 },
351};
352
353unsigned short bfin_sport2_peripherals[] = {
354 P_SPORT2_TFS, P_SPORT2_DTPRI, P_SPORT2_TSCLK, P_SPORT2_RFS,
355 P_SPORT2_DRPRI, P_SPORT2_RSCLK, P_SPORT2_DRSEC, P_SPORT2_DTSEC, 0
356};
357
358static struct platform_device bfin_sport2_uart_device = {
359 .name = "bfin-sport-uart",
360 .id = 2,
361 .num_resources = ARRAY_SIZE(bfin_sport2_uart_resources),
362 .resource = bfin_sport2_uart_resources,
363 .dev = {
364 .platform_data = &bfin_sport2_peripherals, /* Passed to driver */
365 },
366};
367#endif
368#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
369static struct resource bfin_sport3_uart_resources[] = {
370 {
371 .start = SPORT3_TCR1,
372 .end = SPORT3_MRCS3+4,
373 .flags = IORESOURCE_MEM,
374 },
375 {
376 .start = IRQ_SPORT3_RX,
377 .end = IRQ_SPORT3_RX+1,
378 .flags = IORESOURCE_IRQ,
379 },
380 {
381 .start = IRQ_SPORT3_ERROR,
382 .end = IRQ_SPORT3_ERROR,
383 .flags = IORESOURCE_IRQ,
384 },
385};
386
387unsigned short bfin_sport3_peripherals[] = {
388 P_SPORT3_TFS, P_SPORT3_DTPRI, P_SPORT3_TSCLK, P_SPORT3_RFS,
389 P_SPORT3_DRPRI, P_SPORT3_RSCLK, P_SPORT3_DRSEC, P_SPORT3_DTSEC, 0
390};
391
392static struct platform_device bfin_sport3_uart_device = {
393 .name = "bfin-sport-uart",
394 .id = 3,
395 .num_resources = ARRAY_SIZE(bfin_sport3_uart_resources),
396 .resource = bfin_sport3_uart_resources,
397 .dev = {
398 .platform_data = &bfin_sport3_peripherals, /* Passed to driver */
399 },
400};
401#endif
402#endif
403
265#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 404#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
266unsigned short bfin_can_peripherals[] = { 405unsigned short bfin_can_peripherals[] = {
267 P_CAN0_RX, P_CAN0_TX, 0 406 P_CAN0_RX, P_CAN0_TX, 0
@@ -767,6 +906,21 @@ static struct platform_device *cm_bf538_devices[] __initdata = {
767#endif 906#endif
768#endif 907#endif
769 908
909#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
910#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
911 &bfin_sport0_uart_device,
912#endif
913#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
914 &bfin_sport1_uart_device,
915#endif
916#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
917 &bfin_sport2_uart_device,
918#endif
919#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
920 &bfin_sport3_uart_device,
921#endif
922#endif
923
770#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 924#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
771 &bfin_can_device, 925 &bfin_can_device,
772#endif 926#endif
diff --git a/arch/blackfin/mach-bf548/boards/cm_bf548.c b/arch/blackfin/mach-bf548/boards/cm_bf548.c
index 635f92723e12..cb7458792196 100644
--- a/arch/blackfin/mach-bf548/boards/cm_bf548.c
+++ b/arch/blackfin/mach-bf548/boards/cm_bf548.c
@@ -526,6 +526,145 @@ static struct platform_device musb_device = {
526}; 526};
527#endif 527#endif
528 528
529#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
530#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
531static struct resource bfin_sport0_uart_resources[] = {
532 {
533 .start = SPORT0_TCR1,
534 .end = SPORT0_MRCS3+4,
535 .flags = IORESOURCE_MEM,
536 },
537 {
538 .start = IRQ_SPORT0_RX,
539 .end = IRQ_SPORT0_RX+1,
540 .flags = IORESOURCE_IRQ,
541 },
542 {
543 .start = IRQ_SPORT0_ERROR,
544 .end = IRQ_SPORT0_ERROR,
545 .flags = IORESOURCE_IRQ,
546 },
547};
548
549unsigned short bfin_sport0_peripherals[] = {
550 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
551 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
552};
553
554static struct platform_device bfin_sport0_uart_device = {
555 .name = "bfin-sport-uart",
556 .id = 0,
557 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
558 .resource = bfin_sport0_uart_resources,
559 .dev = {
560 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
561 },
562};
563#endif
564#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
565static struct resource bfin_sport1_uart_resources[] = {
566 {
567 .start = SPORT1_TCR1,
568 .end = SPORT1_MRCS3+4,
569 .flags = IORESOURCE_MEM,
570 },
571 {
572 .start = IRQ_SPORT1_RX,
573 .end = IRQ_SPORT1_RX+1,
574 .flags = IORESOURCE_IRQ,
575 },
576 {
577 .start = IRQ_SPORT1_ERROR,
578 .end = IRQ_SPORT1_ERROR,
579 .flags = IORESOURCE_IRQ,
580 },
581};
582
583unsigned short bfin_sport1_peripherals[] = {
584 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
585 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
586};
587
588static struct platform_device bfin_sport1_uart_device = {
589 .name = "bfin-sport-uart",
590 .id = 1,
591 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
592 .resource = bfin_sport1_uart_resources,
593 .dev = {
594 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
595 },
596};
597#endif
598#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
599static struct resource bfin_sport2_uart_resources[] = {
600 {
601 .start = SPORT2_TCR1,
602 .end = SPORT2_MRCS3+4,
603 .flags = IORESOURCE_MEM,
604 },
605 {
606 .start = IRQ_SPORT2_RX,
607 .end = IRQ_SPORT2_RX+1,
608 .flags = IORESOURCE_IRQ,
609 },
610 {
611 .start = IRQ_SPORT2_ERROR,
612 .end = IRQ_SPORT2_ERROR,
613 .flags = IORESOURCE_IRQ,
614 },
615};
616
617unsigned short bfin_sport2_peripherals[] = {
618 P_SPORT2_TFS, P_SPORT2_DTPRI, P_SPORT2_TSCLK, P_SPORT2_RFS,
619 P_SPORT2_DRPRI, P_SPORT2_RSCLK, P_SPORT2_DRSEC, P_SPORT2_DTSEC, 0
620};
621
622static struct platform_device bfin_sport2_uart_device = {
623 .name = "bfin-sport-uart",
624 .id = 2,
625 .num_resources = ARRAY_SIZE(bfin_sport2_uart_resources),
626 .resource = bfin_sport2_uart_resources,
627 .dev = {
628 .platform_data = &bfin_sport2_peripherals, /* Passed to driver */
629 },
630};
631#endif
632#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
633static struct resource bfin_sport3_uart_resources[] = {
634 {
635 .start = SPORT3_TCR1,
636 .end = SPORT3_MRCS3+4,
637 .flags = IORESOURCE_MEM,
638 },
639 {
640 .start = IRQ_SPORT3_RX,
641 .end = IRQ_SPORT3_RX+1,
642 .flags = IORESOURCE_IRQ,
643 },
644 {
645 .start = IRQ_SPORT3_ERROR,
646 .end = IRQ_SPORT3_ERROR,
647 .flags = IORESOURCE_IRQ,
648 },
649};
650
651unsigned short bfin_sport3_peripherals[] = {
652 P_SPORT3_TFS, P_SPORT3_DTPRI, P_SPORT3_TSCLK, P_SPORT3_RFS,
653 P_SPORT3_DRPRI, P_SPORT3_RSCLK, P_SPORT3_DRSEC, P_SPORT3_DTSEC, 0
654};
655
656static struct platform_device bfin_sport3_uart_device = {
657 .name = "bfin-sport-uart",
658 .id = 3,
659 .num_resources = ARRAY_SIZE(bfin_sport3_uart_resources),
660 .resource = bfin_sport3_uart_resources,
661 .dev = {
662 .platform_data = &bfin_sport3_peripherals, /* Passed to driver */
663 },
664};
665#endif
666#endif
667
529#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 668#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
530static struct resource bfin_atapi_resources[] = { 669static struct resource bfin_atapi_resources[] = {
531 { 670 {
@@ -960,6 +1099,21 @@ static struct platform_device *cm_bf548_devices[] __initdata = {
960 &musb_device, 1099 &musb_device,
961#endif 1100#endif
962 1101
1102#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1103#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1104 &bfin_sport0_uart_device,
1105#endif
1106#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1107 &bfin_sport1_uart_device,
1108#endif
1109#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1110 &bfin_sport2_uart_device,
1111#endif
1112#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
1113 &bfin_sport3_uart_device,
1114#endif
1115#endif
1116
963#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE) 1117#if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
964 &bfin_atapi_device, 1118 &bfin_atapi_device,
965#endif 1119#endif
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c
index 1ed026157737..97033fea102e 100644
--- a/arch/blackfin/mach-bf548/boards/ezkit.c
+++ b/arch/blackfin/mach-bf548/boards/ezkit.c
@@ -631,6 +631,145 @@ static struct platform_device musb_device = {
631}; 631};
632#endif 632#endif
633 633
634#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
635#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
636static struct resource bfin_sport0_uart_resources[] = {
637 {
638 .start = SPORT0_TCR1,
639 .end = SPORT0_MRCS3+4,
640 .flags = IORESOURCE_MEM,
641 },
642 {
643 .start = IRQ_SPORT0_RX,
644 .end = IRQ_SPORT0_RX+1,
645 .flags = IORESOURCE_IRQ,
646 },
647 {
648 .start = IRQ_SPORT0_ERROR,
649 .end = IRQ_SPORT0_ERROR,
650 .flags = IORESOURCE_IRQ,
651 },
652};
653
654unsigned short bfin_sport0_peripherals[] = {
655 P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
656 P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0
657};
658
659static struct platform_device bfin_sport0_uart_device = {
660 .name = "bfin-sport-uart",
661 .id = 0,
662 .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
663 .resource = bfin_sport0_uart_resources,
664 .dev = {
665 .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
666 },
667};
668#endif
669#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
670static struct resource bfin_sport1_uart_resources[] = {
671 {
672 .start = SPORT1_TCR1,
673 .end = SPORT1_MRCS3+4,
674 .flags = IORESOURCE_MEM,
675 },
676 {
677 .start = IRQ_SPORT1_RX,
678 .end = IRQ_SPORT1_RX+1,
679 .flags = IORESOURCE_IRQ,
680 },
681 {
682 .start = IRQ_SPORT1_ERROR,
683 .end = IRQ_SPORT1_ERROR,
684 .flags = IORESOURCE_IRQ,
685 },
686};
687
688unsigned short bfin_sport1_peripherals[] = {
689 P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
690 P_SPORT1_DRPRI, P_SPORT1_RSCLK, P_SPORT1_DRSEC, P_SPORT1_DTSEC, 0
691};
692
693static struct platform_device bfin_sport1_uart_device = {
694 .name = "bfin-sport-uart",
695 .id = 1,
696 .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
697 .resource = bfin_sport1_uart_resources,
698 .dev = {
699 .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
700 },
701};
702#endif
703#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
704static struct resource bfin_sport2_uart_resources[] = {
705 {
706 .start = SPORT2_TCR1,
707 .end = SPORT2_MRCS3+4,
708 .flags = IORESOURCE_MEM,
709 },
710 {
711 .start = IRQ_SPORT2_RX,
712 .end = IRQ_SPORT2_RX+1,
713 .flags = IORESOURCE_IRQ,
714 },
715 {
716 .start = IRQ_SPORT2_ERROR,
717 .end = IRQ_SPORT2_ERROR,
718 .flags = IORESOURCE_IRQ,
719 },
720};
721
722unsigned short bfin_sport2_peripherals[] = {
723 P_SPORT2_TFS, P_SPORT2_DTPRI, P_SPORT2_TSCLK, P_SPORT2_RFS,
724 P_SPORT2_DRPRI, P_SPORT2_RSCLK, P_SPORT2_DRSEC, P_SPORT2_DTSEC, 0
725};
726
727static struct platform_device bfin_sport2_uart_device = {
728 .name = "bfin-sport-uart",
729 .id = 2,
730 .num_resources = ARRAY_SIZE(bfin_sport2_uart_resources),
731 .resource = bfin_sport2_uart_resources,
732 .dev = {
733 .platform_data = &bfin_sport2_peripherals, /* Passed to driver */
734 },
735};
736#endif
737#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
738static struct resource bfin_sport3_uart_resources[] = {
739 {
740 .start = SPORT3_TCR1,
741 .end = SPORT3_MRCS3+4,
742 .flags = IORESOURCE_MEM,
743 },
744 {
745 .start = IRQ_SPORT3_RX,
746 .end = IRQ_SPORT3_RX+1,
747 .flags = IORESOURCE_IRQ,
748 },
749 {
750 .start = IRQ_SPORT3_ERROR,
751 .end = IRQ_SPORT3_ERROR,
752 .flags = IORESOURCE_IRQ,
753 },
754};
755
756unsigned short bfin_sport3_peripherals[] = {
757 P_SPORT3_TFS, P_SPORT3_DTPRI, P_SPORT3_TSCLK, P_SPORT3_RFS,
758 P_SPORT3_DRPRI, P_SPORT3_RSCLK, P_SPORT3_DRSEC, P_SPORT3_DTSEC, 0
759};
760
761static struct platform_device bfin_sport3_uart_device = {
762 .name = "bfin-sport-uart",
763 .id = 3,
764 .num_resources = ARRAY_SIZE(bfin_sport3_uart_resources),
765 .resource = bfin_sport3_uart_resources,
766 .dev = {
767 .platform_data = &bfin_sport3_peripherals, /* Passed to driver */
768 },
769};
770#endif
771#endif
772
634#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 773#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
635unsigned short bfin_can_peripherals[] = { 774unsigned short bfin_can_peripherals[] = {
636 P_CAN0_RX, P_CAN0_TX, 0 775 P_CAN0_RX, P_CAN0_TX, 0
@@ -1172,6 +1311,21 @@ static struct platform_device *ezkit_devices[] __initdata = {
1172 &bfin_isp1760_device, 1311 &bfin_isp1760_device,
1173#endif 1312#endif
1174 1313
1314#if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
1315#ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
1316 &bfin_sport0_uart_device,
1317#endif
1318#ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
1319 &bfin_sport1_uart_device,
1320#endif
1321#ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
1322 &bfin_sport2_uart_device,
1323#endif
1324#ifdef CONFIG_SERIAL_BFIN_SPORT3_UART
1325 &bfin_sport3_uart_device,
1326#endif
1327#endif
1328
1175#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE) 1329#if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
1176 &bfin_can_device, 1330 &bfin_can_device,
1177#endif 1331#endif