Re: [PATCH v5] spi: spi-ti-qspi: Add DMA support for QSPI mmap read

2016-08-16 Thread Vignesh R
On Wednesday 17 August 2016 12:12 AM, Mark Brown wrote: > On Tue, Aug 09, 2016 at 06:20:01PM +0530, Vignesh R wrote: >> >> > >> According to this thread[1], converting virtual address >> pointer into scatterlist which is then DMA mapped is unsafe on systems >> with certain cache architecture. He

Re: [PATCH v5] spi: spi-ti-qspi: Add DMA support for QSPI mmap read

2016-08-16 Thread Mark Brown
On Tue, Aug 09, 2016 at 06:20:01PM +0530, Vignesh R wrote: > > > According to this thread[1], converting virtual address > pointer into scatterlist which is then DMA mapped is unsafe on systems > with certain cache architecture. Hence, I added code to handle kmap > buffers inside the driver rath

Re: [PATCH v5] spi: spi-ti-qspi: Add DMA support for QSPI mmap read

2016-08-09 Thread Vignesh R
On Tuesday 09 August 2016 05:03 PM, Mark Brown wrote: > On Tue, Aug 09, 2016 at 04:33:11PM +0530, Vignesh R wrote: > >> +static int ti_qspi_map_buf(struct ti_qspi *qspi, void *buf, >> + unsigned int len, struct sg_table *sgt) >> +{ >> +unsigned int max_seg_size = >> +

Re: [PATCH v5] spi: spi-ti-qspi: Add DMA support for QSPI mmap read

2016-08-09 Thread Mark Brown
On Tue, Aug 09, 2016 at 04:33:11PM +0530, Vignesh R wrote: > +static int ti_qspi_map_buf(struct ti_qspi *qspi, void *buf, > +unsigned int len, struct sg_table *sgt) > +{ > + unsigned int max_seg_size = > + dma_get_max_seg_size(qspi->rx_chan->device->dev); >

[PATCH v5] spi: spi-ti-qspi: Add DMA support for QSPI mmap read

2016-08-09 Thread Vignesh R
Use mem-to-mem DMA to read from flash when reading in mmap mode. This gives improved read performance and reduces CPU load. With this patch the raw-read throughput is ~16MB/s on DRA74 EVM. And CPU load is <20%. UBIFS read ~13 MB/s. Signed-off-by: Vignesh R --- v5: Move setting up DMA channel to