Skip to content

Commit cd7bed0

Browse files
westeribroonie
authored andcommitted
spi/pxa2xx: break out the private DMA API usage into a separate file
The PXA SPI driver uses PXA platform specific private DMA implementation which does not work on non-PXA platforms. In order to use this driver on other platforms we break out the private DMA implementation into a separate file that gets compiled only when CONFIG_SPI_PXA2XX_PXADMA is set. The DMA functions are stubbed out if there is no DMA implementation selected (i.e we are building on non-PXA platform). While we are there we can kill the dummy DMA bits in pxa2xx_spi.h as they are not needed anymore for CE4100. Once this is done we can add the generic DMA engine support to the driver that allows usage of any DMA controller that implements DMA engine API. Signed-off-by: Mika Westerberg <[email protected]> Acked-by: Linus Walleij <[email protected]> Tested-by: Lu Cao <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent d560040 commit cd7bed0

File tree

6 files changed

+712
-648
lines changed

6 files changed

+712
-648
lines changed

drivers/spi/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,12 @@ config SPI_PPC4xx
297297
help
298298
This selects a driver for the PPC4xx SPI Controller.
299299

300+
config SPI_PXA2XX_PXADMA
301+
bool "PXA2xx SSP legacy PXA DMA API support"
302+
depends on SPI_PXA2XX && ARCH_PXA
303+
help
304+
Enable PXA private legacy DMA API support.
305+
300306
config SPI_PXA2XX
301307
tristate "PXA2xx SSP SPI master"
302308
depends on ARCH_PXA || PCI

drivers/spi/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ obj-$(CONFIG_SPI_OMAP24XX) += spi-omap2-mcspi.o
4747
obj-$(CONFIG_SPI_ORION) += spi-orion.o
4848
obj-$(CONFIG_SPI_PL022) += spi-pl022.o
4949
obj-$(CONFIG_SPI_PPC4xx) += spi-ppc4xx.o
50-
obj-$(CONFIG_SPI_PXA2XX) += spi-pxa2xx.o
50+
spi-pxa2xx-platform-objs := spi-pxa2xx.o
51+
spi-pxa2xx-platform-$(CONFIG_SPI_PXA2XX_PXADMA) += spi-pxa2xx-pxadma.o
52+
obj-$(CONFIG_SPI_PXA2XX) += spi-pxa2xx-platform.o
5153
obj-$(CONFIG_SPI_PXA2XX_PCI) += spi-pxa2xx-pci.o
5254
obj-$(CONFIG_SPI_RSPI) += spi-rspi.o
5355
obj-$(CONFIG_SPI_S3C24XX) += spi-s3c24xx-hw.o

0 commit comments

Comments
 (0)