Are DMA transfers supported with the davinci-spi device driver that is configured using devicetree?

334 views Asked by At

I am trying to use DMA to program an FPGA connected to an OMAP-L138's SPI bus, but without success.

Currently, I am using the stock davinci-spi driver (drivers/spi/spi-davinci.c)that comes with linux 3.19. FPGA configuration is successful (without DMA enabled), but it is very slow. I am using a device tree to configure the SPI interface.

I would like to use DMA to improve performance, however from looking at the spi-davinci.c source code and its device tree bindings, the driver does not appear to support DMA when configured with device tree. Is my understanding correct? If so, are there any plans to support DMA transfers using davinci's SPI driver when also using device tree?

1

There are 1 answers

0
stdcall On

Here are a few guidelines to achieve your goal:

First, check if the SPI has it's own DMA engine. If it doesn't, perhaps there's a generic DMA controller on board. You can check this by looking at the SPI datasheet and looking at the board interconnect schematics.

If none of the above are true, then you can't use DMA with the SPI.

If the SPI has its own DMA, you'll need to write a driver for that. If there's a DMA on board, it's probably utilized by other components, search for dma_dngine driver for that particular device. Then you'll need to create a DMA client for that particular DMA engine.

Please read:

DMA Provider

DMA Client

Good luck