aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf527/boards/ezkit.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-bf527/boards/ezkit.c')
-rw-r--r--arch/blackfin/mach-bf527/boards/ezkit.c98
1 files changed, 89 insertions, 9 deletions
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c
index 5294fdd20732..0750e655fb22 100644
--- a/arch/blackfin/mach-bf527/boards/ezkit.c
+++ b/arch/blackfin/mach-bf527/boards/ezkit.c
@@ -647,30 +647,105 @@ static struct platform_device bfin_spi0_device = {
647#endif /* spi master and devices */ 647#endif /* spi master and devices */
648 648
649#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 649#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
650static struct resource bfin_uart_resources[] = {
651#ifdef CONFIG_SERIAL_BFIN_UART0 650#ifdef CONFIG_SERIAL_BFIN_UART0
651static struct resource bfin_uart0_resources[] = {
652 { 652 {
653 .start = 0xFFC00400, 653 .start = UART0_THR,
654 .end = 0xFFC004FF, 654 .end = UART0_GCTL+2,
655 .flags = IORESOURCE_MEM, 655 .flags = IORESOURCE_MEM,
656 }, 656 },
657 {
658 .start = IRQ_UART0_RX,
659 .end = IRQ_UART0_RX+1,
660 .flags = IORESOURCE_IRQ,
661 },
662 {
663 .start = IRQ_UART0_ERROR,
664 .end = IRQ_UART0_ERROR,
665 .flags = IORESOURCE_IRQ,
666 },
667 {
668 .start = CH_UART0_TX,
669 .end = CH_UART0_TX,
670 .flags = IORESOURCE_DMA,
671 },
672 {
673 .start = CH_UART0_RX,
674 .end = CH_UART0_RX,
675 .flags = IORESOURCE_DMA,
676 },
677};
678
679unsigned short bfin_uart0_peripherals[] = {
680 P_UART0_TX, P_UART0_RX, 0
681};
682
683static struct platform_device bfin_uart0_device = {
684 .name = "bfin-uart",
685 .id = 0,
686 .num_resources = ARRAY_SIZE(bfin_uart0_resources),
687 .resource = bfin_uart0_resources,
688 .dev = {
689 .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
690 },
691};
657#endif 692#endif
658#ifdef CONFIG_SERIAL_BFIN_UART1 693#ifdef CONFIG_SERIAL_BFIN_UART1
694static struct resource bfin_uart1_resources[] = {
659 { 695 {
660 .start = 0xFFC02000, 696 .start = UART1_THR,
661 .end = 0xFFC020FF, 697 .end = UART1_GCTL+2,
662 .flags = IORESOURCE_MEM, 698 .flags = IORESOURCE_MEM,
663 }, 699 },
700 {
701 .start = IRQ_UART1_RX,
702 .end = IRQ_UART1_RX+1,
703 .flags = IORESOURCE_IRQ,
704 },
705 {
706 .start = IRQ_UART1_ERROR,
707 .end = IRQ_UART1_ERROR,
708 .flags = IORESOURCE_IRQ,
709 },
710 {
711 .start = CH_UART1_TX,
712 .end = CH_UART1_TX,
713 .flags = IORESOURCE_DMA,
714 },
715 {
716 .start = CH_UART1_RX,
717 .end = CH_UART1_RX,
718 .flags = IORESOURCE_DMA,
719 },
720#ifdef CONFIG_BFIN_UART1_CTSRTS
721 { /* CTS pin */
722 .start = GPIO_PF9,
723 .end = GPIO_PF9,
724 .flags = IORESOURCE_IO,
725 },
726 { /* RTS pin */
727 .start = GPIO_PF10,
728 .end = GPIO_PF10,
729 .flags = IORESOURCE_IO,
730 },
664#endif 731#endif
665}; 732};
666 733
667static struct platform_device bfin_uart_device = { 734unsigned short bfin_uart1_peripherals[] = {
735 P_UART1_TX, P_UART1_RX, 0
736};
737
738static struct platform_device bfin_uart1_device = {
668 .name = "bfin-uart", 739 .name = "bfin-uart",
669 .id = 1, 740 .id = 1,
670 .num_resources = ARRAY_SIZE(bfin_uart_resources), 741 .num_resources = ARRAY_SIZE(bfin_uart1_resources),
671 .resource = bfin_uart_resources, 742 .resource = bfin_uart1_resources,
743 .dev = {
744 .platform_data = &bfin_uart1_peripherals, /* Passed to driver */
745 },
672}; 746};
673#endif 747#endif
748#endif
674 749
675#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 750#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
676#ifdef CONFIG_BFIN_SIR0 751#ifdef CONFIG_BFIN_SIR0
@@ -910,7 +985,12 @@ static struct platform_device *stamp_devices[] __initdata = {
910#endif 985#endif
911 986
912#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) 987#if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
913 &bfin_uart_device, 988#ifdef CONFIG_SERIAL_BFIN_UART0
989 &bfin_uart0_device,
990#endif
991#ifdef CONFIG_SERIAL_BFIN_UART1
992 &bfin_uart1_device,
993#endif
914#endif 994#endif
915 995
916#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE) 996#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)