diff options
author | Cliff Cai <cliff.cai@analog.com> | 2009-03-28 11:28:51 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2009-03-28 11:28:51 -0400 |
commit | 1e9aa95526c3dfc50e55665c7129469a12593beb (patch) | |
tree | 3965b6b5638d696eb04a2e8b51fac221c572ebf0 /arch/blackfin | |
parent | b89df5042300bc08492a567f409c6899863ed8a3 (diff) |
Blackfin arch: add sport-spi related resource stuff to board file
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index f32b7477dcb0..0572926da23f 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -843,6 +843,71 @@ static struct platform_device bfin_spi0_device = { | |||
843 | }; | 843 | }; |
844 | #endif /* spi master and devices */ | 844 | #endif /* spi master and devices */ |
845 | 845 | ||
846 | #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) | ||
847 | |||
848 | /* SPORT SPI controller data */ | ||
849 | static struct bfin5xx_spi_master bfin_sport_spi0_info = { | ||
850 | .num_chipselect = 1, /* master only supports one device */ | ||
851 | .enable_dma = 0, /* master don't support DMA */ | ||
852 | .pin_req = {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_DRPRI, | ||
853 | P_SPORT0_RSCLK, P_SPORT0_TFS, P_SPORT0_RFS, 0}, | ||
854 | }; | ||
855 | |||
856 | static struct resource bfin_sport_spi0_resource[] = { | ||
857 | [0] = { | ||
858 | .start = SPORT0_TCR1, | ||
859 | .end = SPORT0_TCR1 + 0xFF, | ||
860 | .flags = IORESOURCE_MEM, | ||
861 | }, | ||
862 | [1] = { | ||
863 | .start = IRQ_SPORT0_ERROR, | ||
864 | .end = IRQ_SPORT0_ERROR, | ||
865 | .flags = IORESOURCE_IRQ, | ||
866 | }, | ||
867 | }; | ||
868 | |||
869 | static struct platform_device bfin_sport_spi0_device = { | ||
870 | .name = "bfin-sport-spi", | ||
871 | .id = 1, /* Bus number */ | ||
872 | .num_resources = ARRAY_SIZE(bfin_sport_spi0_resource), | ||
873 | .resource = bfin_sport_spi0_resource, | ||
874 | .dev = { | ||
875 | .platform_data = &bfin_sport_spi0_info, /* Passed to driver */ | ||
876 | }, | ||
877 | }; | ||
878 | |||
879 | static struct bfin5xx_spi_master bfin_sport_spi1_info = { | ||
880 | .num_chipselect = 1, /* master only supports one device */ | ||
881 | .enable_dma = 0, /* master don't support DMA */ | ||
882 | .pin_req = {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_DRPRI, | ||
883 | P_SPORT1_RSCLK, P_SPORT1_TFS, P_SPORT1_RFS, 0}, | ||
884 | }; | ||
885 | |||
886 | static struct resource bfin_sport_spi1_resource[] = { | ||
887 | [0] = { | ||
888 | .start = SPORT1_TCR1, | ||
889 | .end = SPORT1_TCR1 + 0xFF, | ||
890 | .flags = IORESOURCE_MEM, | ||
891 | }, | ||
892 | [1] = { | ||
893 | .start = IRQ_SPORT1_ERROR, | ||
894 | .end = IRQ_SPORT1_ERROR, | ||
895 | .flags = IORESOURCE_IRQ, | ||
896 | }, | ||
897 | }; | ||
898 | |||
899 | static struct platform_device bfin_sport_spi1_device = { | ||
900 | .name = "bfin-sport-spi", | ||
901 | .id = 2, /* Bus number */ | ||
902 | .num_resources = ARRAY_SIZE(bfin_sport_spi1_resource), | ||
903 | .resource = bfin_sport_spi1_resource, | ||
904 | .dev = { | ||
905 | .platform_data = &bfin_sport_spi1_info, /* Passed to driver */ | ||
906 | }, | ||
907 | }; | ||
908 | |||
909 | #endif /* sport spi master and devices */ | ||
910 | |||
846 | #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) | 911 | #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) |
847 | static struct platform_device bfin_fb_device = { | 912 | static struct platform_device bfin_fb_device = { |
848 | .name = "bf537-lq035", | 913 | .name = "bf537-lq035", |
@@ -1395,6 +1460,11 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1395 | &bfin_spi0_device, | 1460 | &bfin_spi0_device, |
1396 | #endif | 1461 | #endif |
1397 | 1462 | ||
1463 | #if defined(CONFIG_SPI_BFIN_SPORT) || defined(CONFIG_SPI_BFIN_SPORT_MODULE) | ||
1464 | &bfin_sport_spi0_device, | ||
1465 | &bfin_sport_spi1_device, | ||
1466 | #endif | ||
1467 | |||
1398 | #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) | 1468 | #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE) |
1399 | &bfin_fb_device, | 1469 | &bfin_fb_device, |
1400 | #endif | 1470 | #endif |