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>
This commit is contained in:
@@ -144,10 +144,10 @@ config SPI_OMAP_UWIRE
|
|||||||
This hooks up to the MicroWire controller on OMAP1 chips.
|
This hooks up to the MicroWire controller on OMAP1 chips.
|
||||||
|
|
||||||
config SPI_OMAP24XX
|
config SPI_OMAP24XX
|
||||||
tristate "McSPI driver for OMAP24xx"
|
tristate "McSPI driver for OMAP24xx/OMAP34xx"
|
||||||
depends on SPI_MASTER && ARCH_OMAP24XX
|
depends on SPI_MASTER && (ARCH_OMAP24XX || ARCH_OMAP34XX)
|
||||||
help
|
help
|
||||||
SPI master controller for OMAP24xx Multichannel SPI
|
SPI master controller for OMAP24xx/OMAP34xx Multichannel SPI
|
||||||
(McSPI) modules.
|
(McSPI) modules.
|
||||||
|
|
||||||
config SPI_PXA2XX
|
config SPI_PXA2XX
|
||||||
|
@@ -915,6 +915,28 @@ static u8 __initdata spi2_txdma_id[] = {
|
|||||||
OMAP24XX_DMA_SPI2_TX1,
|
OMAP24XX_DMA_SPI2_TX1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP34XX)
|
||||||
|
static u8 __initdata spi3_rxdma_id[] = {
|
||||||
|
OMAP24XX_DMA_SPI3_RX0,
|
||||||
|
OMAP24XX_DMA_SPI3_RX1,
|
||||||
|
};
|
||||||
|
|
||||||
|
static u8 __initdata spi3_txdma_id[] = {
|
||||||
|
OMAP24XX_DMA_SPI3_TX0,
|
||||||
|
OMAP24XX_DMA_SPI3_TX1,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARCH_OMAP3
|
||||||
|
static u8 __initdata spi4_rxdma_id[] = {
|
||||||
|
OMAP34XX_DMA_SPI4_RX0,
|
||||||
|
};
|
||||||
|
|
||||||
|
static u8 __initdata spi4_txdma_id[] = {
|
||||||
|
OMAP34XX_DMA_SPI4_TX0,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static int __init omap2_mcspi_probe(struct platform_device *pdev)
|
static int __init omap2_mcspi_probe(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct spi_master *master;
|
struct spi_master *master;
|
||||||
@@ -935,7 +957,20 @@ static int __init omap2_mcspi_probe(struct platform_device *pdev)
|
|||||||
txdma_id = spi2_txdma_id;
|
txdma_id = spi2_txdma_id;
|
||||||
num_chipselect = 2;
|
num_chipselect = 2;
|
||||||
break;
|
break;
|
||||||
/* REVISIT omap2430 has a third McSPI ... */
|
#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3)
|
||||||
|
case 3:
|
||||||
|
rxdma_id = spi3_rxdma_id;
|
||||||
|
txdma_id = spi3_txdma_id;
|
||||||
|
num_chipselect = 2;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_ARCH_OMAP3
|
||||||
|
case 4:
|
||||||
|
rxdma_id = spi4_rxdma_id;
|
||||||
|
txdma_id = spi4_txdma_id;
|
||||||
|
num_chipselect = 1;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user