Hi,

On Mon, Jun 07, 2010 at 20:39:05, Brian Niebuhr wrote:
> NOTE
> 
> This patch requires the EDMA patch at:
> 
> http://linux.davincidsp.com/pipermail/davinci-linux-open-source/2010-March/018022.html
> 
> which has since been reverted out of the davinci kernel.
> 
> 
> INTRODUCTION
> 
> I have been working on a custom OMAP-L138 board that has multiple spi
> devices (seven) on one controller.  These devices have a wide range of
> transfer parameters (speed, phase, polarity, internal and gpio chip
> selects).  During my testing I found multiple errors in the davinci spi
> driver as a result of this complex setup.  The primary issues were:
> 
> 1. There is a race condition due to the SPIBUF read busy-waits for slow
>         devices
> 2. I found some DMA transfer length errors under some conditions
> 3. The chip select code caused extra byte transfers (with no chip
>         select active) due to writes to SPIDAT1
> 4. Several issues prevented using multiple SPI devices, especially
>         the DMA code, as disucussed previously on the davinci list.
> 
> The fixes to these problems were not simple.  I ended up making fairly
> large changes to the driver, and those changes are contained in these
> patches.  The full list of changes follows.
> 
> CHANGE LIST
> 
> 1. davinci_spi_chipelect() now performs both activation and deactivation
>         of chip selects.  This lets spi_bitbang fully control chip
>         select activation, as intended by the SPI API.
> 2. Chip select activation does not cause extra writes to the SPI bus
> 3. Chip select activation does not use SPIDEF for control.  This change
>         will also allow for implementation of inverted (active high)
>         chip selects in the future.
> 4. Added back gpio chip select capability from the old driver
> 5. Fixed prescale calculation for non-integer fractions of spi clock
> 6. Allow specification of SPI transfer parameters on a per-device
>         (instead of per-controller) basis
> 7. Allow specification of polled, interrupt-based, or DMA operation on
>         a per-device basis
> 8. Allow DMA with when more than one device is connected
> 9. Combined pio and dma txrx_bufs functions into one since they share
>         large parts of their functionality, and to simplify item (8).
> 10. Use only SPIFMT0 to allow more than 4 devices
> 
> TESTING
> 
> I have tested the driver using a custom SPI stress test on my
> OMAP-L138-based board with three devices connected.  I have tested
> configurations with all three devices polled, all three interrupt-based,
> all three DMA, and a mixture.
> 
> I have compiled with the davinci_all_defconfig, but I don't have EVMs
> for the other davinci platforms to test with.
> 

I was testing this series on OMAP-L137, OMAP-L138 and DM365 EVMs and I
found that on all these EVMS, Interrupt mode has problems. Driver works
fine in DMA and POLL modes. Some problems which I had observed with the
old driver are gone now.

Regards,
Sudhakar


_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to