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-bf548/boards/ezkit.c | |
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-bf548/boards/ezkit.c')
-rw-r--r-- | arch/blackfin/mach-bf548/boards/ezkit.c | 154 |
1 files changed, 154 insertions, 0 deletions
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 | ||
636 | static 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 | |||
654 | unsigned 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 | |||
659 | static 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 | ||
670 | static 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 | |||
688 | unsigned 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 | |||
693 | static 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 | ||
704 | static 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 | |||
722 | unsigned 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 | |||
727 | static 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 | ||
738 | static 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 | |||
756 | unsigned 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 | |||
761 | static 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) |
635 | unsigned short bfin_can_peripherals[] = { | 774 | unsigned 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 |