diff options
author | Girish <girishsg@ti.com> | 2008-02-06 04:38:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:11 -0500 |
commit | ccc7baed1868efd02dac88b32cba4a837a558536 (patch) | |
tree | e38690934ade336259044389b9d8ea6bbe3d3c31 /drivers/spi/omap2_mcspi.c | |
parent | 37e466408796300ec935e15f01b4ca88678b96ef (diff) |
spi: omap2_mcspi handles omap3 too
This adds driver OMAP SPI specific changes to support OMAP 3430
Signed-off-by: Girish S G <girishsg@ti.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/spi/omap2_mcspi.c')
-rw-r--r-- | drivers/spi/omap2_mcspi.c | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index ea61724ae22..a6ba11afb03 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c | |||
@@ -915,6 +915,28 @@ static u8 __initdata spi2_txdma_id[] = { | |||
915 | OMAP24XX_DMA_SPI2_TX1, | 915 | OMAP24XX_DMA_SPI2_TX1, |
916 | }; | 916 | }; |
917 | 917 | ||
918 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP34XX) | ||
919 | static u8 __initdata spi3_rxdma_id[] = { | ||
920 | OMAP24XX_DMA_SPI3_RX0, | ||
921 | OMAP24XX_DMA_SPI3_RX1, | ||
922 | }; | ||
923 | |||
924 | static u8 __initdata spi3_txdma_id[] = { | ||
925 | OMAP24XX_DMA_SPI3_TX0, | ||
926 | OMAP24XX_DMA_SPI3_TX1, | ||
927 | }; | ||
928 | #endif | ||
929 | |||
930 | #ifdef CONFIG_ARCH_OMAP3 | ||
931 | static u8 __initdata spi4_rxdma_id[] = { | ||
932 | OMAP34XX_DMA_SPI4_RX0, | ||
933 | }; | ||
934 | |||
935 | static u8 __initdata spi4_txdma_id[] = { | ||
936 | OMAP34XX_DMA_SPI4_TX0, | ||
937 | }; | ||
938 | #endif | ||
939 | |||
918 | static int __init omap2_mcspi_probe(struct platform_device *pdev) | 940 | static int __init omap2_mcspi_probe(struct platform_device *pdev) |
919 | { | 941 | { |
920 | struct spi_master *master; | 942 | struct spi_master *master; |
@@ -935,7 +957,20 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev) | |||
935 | txdma_id = spi2_txdma_id; | 957 | txdma_id = spi2_txdma_id; |
936 | num_chipselect = 2; | 958 | num_chipselect = 2; |
937 | break; | 959 | break; |
938 | /* REVISIT omap2430 has a third McSPI ... */ | 960 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) |
961 | case 3: | ||
962 | rxdma_id = spi3_rxdma_id; | ||
963 | txdma_id = spi3_txdma_id; | ||
964 | num_chipselect = 2; | ||
965 | break; | ||
966 | #endif | ||
967 | #ifdef CONFIG_ARCH_OMAP3 | ||
968 | case 4: | ||
969 | rxdma_id = spi4_rxdma_id; | ||
970 | txdma_id = spi4_txdma_id; | ||
971 | num_chipselect = 1; | ||
972 | break; | ||
973 | #endif | ||
939 | default: | 974 | default: |
940 | return -EINVAL; | 975 | return -EINVAL; |
941 | } | 976 | } |