[U-Boot] [PATCH 08/11] spi: ti_qspi: Use DMA to read from qspi flash

R, Vignesh vigneshr at ti.com
Sat Jul 4 14:53:04 CEST 2015



On 7/3/2015 5:12 PM, Tom Rini wrote:
> On Fri, Jul 03, 2015 at 04:46:10PM +0530, Vignesh R wrote:
> 
>> ti_qspi uses memory map mode for faster read. Enabling DMA will increase
>> read speed by 3x @48MHz on DRA74 EVM.
>>
>> Signed-off-by: Vignesh R <vigneshr at ti.com>
> 
> This ignores the feedback from
> http://lists.denx.de/pipermail/u-boot/2014-July/183715.html where we
> need to model the DMA changes on how it's done for mxs_spi.c
> 

Sorry.. I didn't look into that before.
mxs_spi uses peripheral DMA to read/write flash. But ti_qspi can use DMA
to read from flash in mmap mode only. In current u-boot, defining
CONFIG_TI_SPI_MMAP will make memory map address available
(spi_flash->memory_map) to sf layer and spi_flash_cmd_read_ops() (in
sf_ops.c) directly calls memcpy() to read data from flash into buffer.
There is no spi_xfer() call to the ti_qspi driver at all.

In order to implement mxs_spi like approach for ti_qspi.c, I can delete
mmap handling in sf_ops.c( I don't think any other spi driver uses this
part of code), so that spi_xfer() is always called. And then, in
spi_xfer() implementation of ti_qspi, I can do DMA transfer similar to
mxs_spi.c. Is this approach ok?

And are you ok with patch 1 and 2 of this series?

Regards
Vignesh


More information about the U-Boot mailing list