summaryrefslogtreecommitdiffstats
path: root/include/linux/spi
diff options
context:
space:
mode:
authorVignesh R2017-04-11 13:52:25 +0200
committerMark Brown2017-04-21 19:03:53 +0200
commitc687c46e9e4527c4b4d82bc3cca58c1b08bcfb83 (patch)
tree1e7db7fdf3adb9e07d1e528c277c84fe54f41c51 /include/linux/spi
parentspi: Add can_dma like interface for spi_flash_read (diff)
downloadkernel-qcow2-linux-c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83.tar.gz
kernel-qcow2-linux-c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83.tar.xz
kernel-qcow2-linux-c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83.zip
spi: spi-ti-qspi: Use bounce buffer if read buffer is not DMA'ble
Flash filesystems like JFFS2, UBIFS and MTD block layer can provide vmalloc'd or kmap'd buffers that cannot be mapped using dma_map_sg() and can potentially be in memory region above 32bit addressable region(ie buffers belonging to memory region backed by LPAE) of DMA, implement spi_flash_can_dma() interface to inform SPI core not to map such buffers. When buffers are not mapped for DMA, then use a pre allocated bounce buffer(64K = typical flash erase sector size) to read from flash and then do a copy to actual destination buffer. This is approach is much faster than using memcpy using CPU and also reduces CPU load. With this patch, UBIFS read speed is ~18MB/s and CPU utilization <20% on DRA74 Rev H EVM. Performance degradation is negligible when compared with non bounce buffer case while using UBIFS. Signed-off-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/spi')
0 files changed, 0 insertions, 0 deletions