• Cyrille Pitchen's avatar
    spi: atmel: fix corrupted data issue on SAM9 family SoCs · 7094576c
    Cyrille Pitchen authored
    This patch disables the use of the DMA for data transfer and forces the
    use of PIO transfers instead as a quick fixup to solve the cache aliasing
    issue on ARM9 based cores, which embeds a VIVT data cache.
    
    Indeed in the case of VIVT data caches, it is not safe to call dma_map_*()
    functions to map buffers for DMA transfers when those buffers have been
    allocated by vmalloc() or from any DMA-unsafe area.
    
    Further patches may propose a better solution based on the use of a bounce
    buffer at the SPI sub-system level but such solution needs more time to be
    discussed. Then the use of DMA transfers could be enabled again to improve
    the performances but before that, this patch already solves the issue.
    Signed-off-by: default avatarCyrille Pitchen <cyrille.pitchen@microchip.com>
    Acked-by: default avatarNicolas Ferre <nicolas.ferre@microchip.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    Cc: stable@vger.kernel.org
    7094576c
spi-atmel.c 45.5 KB