diff options
author | Harald Krapfenbauer <harald.krapfenbauer@bluetechnix.at> | 2012-08-14 06:04:06 -0400 |
---|---|---|
committer | Bob Liu <lliubbo@gmail.com> | 2012-10-08 02:36:29 -0400 |
commit | a54081c45c4070c4ec708f63abb87b8d0944f77a (patch) | |
tree | 9e0e8a1c0bb2fedec40470ed845d271cddf0bf31 /arch/blackfin | |
parent | 57820b34690ab6c8b367d6b8b61c21a1fe99f867 (diff) |
Blackfin: CM-BF537E: Update SPORT support in board file.
Signed-off-by: Harald Krapfenbauer <harald.krapfenbauer@bluetechnix.at>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/cm_bf537e.c | 130 |
1 files changed, 125 insertions, 5 deletions
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c index 9408ab56d87f..85e4fc9f9c22 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <asm/bfin5xx_spi.h> | 25 | #include <asm/bfin5xx_spi.h> |
26 | #include <asm/portmux.h> | 26 | #include <asm/portmux.h> |
27 | #include <asm/dpmc.h> | 27 | #include <asm/dpmc.h> |
28 | #include <asm/bfin_sport.h> | ||
28 | 29 | ||
29 | /* | 30 | /* |
30 | * Name the Board for the /proc/cpuinfo | 31 | * Name the Board for the /proc/cpuinfo |
@@ -143,6 +144,71 @@ static struct platform_device bfin_spi0_device = { | |||
143 | }; | 144 | }; |
144 | #endif /* spi master and devices */ | 145 | #endif /* spi master and devices */ |
145 | 146 | ||
147 | #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) | ||
148 | |||
149 | /* SPORT SPI controller data */ | ||
150 | static struct bfin5xx_spi_master bfin_sport_spi0_info = { | ||
151 | .num_chipselect = MAX_BLACKFIN_GPIOS, | ||
152 | .enable_dma = 0, /* master don't support DMA */ | ||
153 | .pin_req = {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_DRPRI, | ||
154 | P_SPORT0_RSCLK, P_SPORT0_TFS, P_SPORT0_RFS, 0}, | ||
155 | }; | ||
156 | |||
157 | static struct resource bfin_sport_spi0_resource[] = { | ||
158 | [0] = { | ||
159 | .start = SPORT0_TCR1, | ||
160 | .end = SPORT0_TCR1 + 0xFF, | ||
161 | .flags = IORESOURCE_MEM, | ||
162 | }, | ||
163 | [1] = { | ||
164 | .start = IRQ_SPORT0_ERROR, | ||
165 | .end = IRQ_SPORT0_ERROR, | ||
166 | .flags = IORESOURCE_IRQ, | ||
167 | }, | ||
168 | }; | ||
169 | |||
170 | static struct platform_device bfin_sport_spi0_device = { | ||
171 | .name = "bfin-sport-spi", | ||
172 | .id = 1, /* Bus number */ | ||
173 | .num_resources = ARRAY_SIZE(bfin_sport_spi0_resource), | ||
174 | .resource = bfin_sport_spi0_resource, | ||
175 | .dev = { | ||
176 | .platform_data = &bfin_sport_spi0_info, /* Passed to driver */ | ||
177 | }, | ||
178 | }; | ||
179 | |||
180 | static struct bfin5xx_spi_master bfin_sport_spi1_info = { | ||
181 | .num_chipselect = MAX_BLACKFIN_GPIOS, | ||
182 | .enable_dma = 0, /* master don't support DMA */ | ||
183 | .pin_req = {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_DRPRI, | ||
184 | P_SPORT1_RSCLK, P_SPORT1_TFS, P_SPORT1_RFS, 0}, | ||
185 | }; | ||
186 | |||
187 | static struct resource bfin_sport_spi1_resource[] = { | ||
188 | [0] = { | ||
189 | .start = SPORT1_TCR1, | ||
190 | .end = SPORT1_TCR1 + 0xFF, | ||
191 | .flags = IORESOURCE_MEM, | ||
192 | }, | ||
193 | [1] = { | ||
194 | .start = IRQ_SPORT1_ERROR, | ||
195 | .end = IRQ_SPORT1_ERROR, | ||
196 | .flags = IORESOURCE_IRQ, | ||
197 | }, | ||
198 | }; | ||
199 | |||
200 | static struct platform_device bfin_sport_spi1_device = { | ||
201 | .name = "bfin-sport-spi", | ||
202 | .id = 2, /* Bus number */ | ||
203 | .num_resources = ARRAY_SIZE(bfin_sport_spi1_resource), | ||
204 | .resource = bfin_sport_spi1_resource, | ||
205 | .dev = { | ||
206 | .platform_data = &bfin_sport_spi1_info, /* Passed to driver */ | ||
207 | }, | ||
208 | }; | ||
209 | |||
210 | #endif /* sport spi master and devices */ | ||
211 | |||
146 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 212 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
147 | static struct platform_device rtc_device = { | 213 | static struct platform_device rtc_device = { |
148 | .name = "rtc-bfin", | 214 | .name = "rtc-bfin", |
@@ -512,6 +578,13 @@ static struct platform_device i2c_bfin_twi_device = { | |||
512 | }; | 578 | }; |
513 | #endif | 579 | #endif |
514 | 580 | ||
581 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) \ | ||
582 | || defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) | ||
583 | unsigned short bfin_sport0_peripherals[] = { | ||
584 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
585 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, P_SPORT0_DRSEC, P_SPORT0_DTSEC, 0 | ||
586 | }; | ||
587 | #endif | ||
515 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 588 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
516 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART | 589 | #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART |
517 | static struct resource bfin_sport0_uart_resources[] = { | 590 | static struct resource bfin_sport0_uart_resources[] = { |
@@ -532,11 +605,6 @@ static struct resource bfin_sport0_uart_resources[] = { | |||
532 | }, | 605 | }, |
533 | }; | 606 | }; |
534 | 607 | ||
535 | static unsigned short bfin_sport0_peripherals[] = { | ||
536 | P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, | ||
537 | P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0 | ||
538 | }; | ||
539 | |||
540 | static struct platform_device bfin_sport0_uart_device = { | 608 | static struct platform_device bfin_sport0_uart_device = { |
541 | .name = "bfin-sport-uart", | 609 | .name = "bfin-sport-uart", |
542 | .id = 0, | 610 | .id = 0, |
@@ -582,6 +650,49 @@ static struct platform_device bfin_sport1_uart_device = { | |||
582 | }; | 650 | }; |
583 | #endif | 651 | #endif |
584 | #endif | 652 | #endif |
653 | #if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) | ||
654 | static struct resource bfin_sport0_resources[] = { | ||
655 | { | ||
656 | .start = SPORT0_TCR1, | ||
657 | .end = SPORT0_MRCS3+4, | ||
658 | .flags = IORESOURCE_MEM, | ||
659 | }, | ||
660 | { | ||
661 | .start = IRQ_SPORT0_RX, | ||
662 | .end = IRQ_SPORT0_RX+1, | ||
663 | .flags = IORESOURCE_IRQ, | ||
664 | }, | ||
665 | { | ||
666 | .start = IRQ_SPORT0_TX, | ||
667 | .end = IRQ_SPORT0_TX+1, | ||
668 | .flags = IORESOURCE_IRQ, | ||
669 | }, | ||
670 | { | ||
671 | .start = IRQ_SPORT0_ERROR, | ||
672 | .end = IRQ_SPORT0_ERROR, | ||
673 | .flags = IORESOURCE_IRQ, | ||
674 | }, | ||
675 | { | ||
676 | .start = CH_SPORT0_TX, | ||
677 | .end = CH_SPORT0_TX, | ||
678 | .flags = IORESOURCE_DMA, | ||
679 | }, | ||
680 | { | ||
681 | .start = CH_SPORT0_RX, | ||
682 | .end = CH_SPORT0_RX, | ||
683 | .flags = IORESOURCE_DMA, | ||
684 | }, | ||
685 | }; | ||
686 | static struct platform_device bfin_sport0_device = { | ||
687 | .name = "bfin_sport_raw", | ||
688 | .id = 0, | ||
689 | .num_resources = ARRAY_SIZE(bfin_sport0_resources), | ||
690 | .resource = bfin_sport0_resources, | ||
691 | .dev = { | ||
692 | .platform_data = &bfin_sport0_peripherals, /* Passed to driver */ | ||
693 | }, | ||
694 | }; | ||
695 | #endif | ||
585 | 696 | ||
586 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 697 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
587 | #include <linux/bfin_mac.h> | 698 | #include <linux/bfin_mac.h> |
@@ -684,6 +795,10 @@ static struct platform_device *cm_bf537e_devices[] __initdata = { | |||
684 | 795 | ||
685 | &bfin_dpmc, | 796 | &bfin_dpmc, |
686 | 797 | ||
798 | #if defined(CONFIG_BFIN_SPORT) || defined(CONFIG_BFIN_SPORT_MODULE) | ||
799 | &bfin_sport0_device, | ||
800 | #endif | ||
801 | |||
687 | #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) | 802 | #if defined(CONFIG_FB_HITACHI_TX09) || defined(CONFIG_FB_HITACHI_TX09_MODULE) |
688 | &hitachi_fb_device, | 803 | &hitachi_fb_device, |
689 | #endif | 804 | #endif |
@@ -744,6 +859,11 @@ static struct platform_device *cm_bf537e_devices[] __initdata = { | |||
744 | &bfin_spi0_device, | 859 | &bfin_spi0_device, |
745 | #endif | 860 | #endif |
746 | 861 | ||
862 | #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) | ||
863 | &bfin_sport_spi0_device, | ||
864 | &bfin_sport_spi1_device, | ||
865 | #endif | ||
866 | |||
747 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) | 867 | #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) |
748 | &bfin_pata_device, | 868 | &bfin_pata_device, |
749 | #endif | 869 | #endif |