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

Vignesh R vigneshr at ti.com
Mon Jul 6 07:34:48 CEST 2015



On Saturday 04 July 2015 06:23 PM, R, Vignesh wrote:
> 
> 
> 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?
> 

I think I misinterpreted the thread previously. The suggestion is to
move DMA initialization related code from to ti-edma3.c and use
spi_flash_copy_mmap() just to pass addresses to ti-edma3 apis. Am I correct?

-- 
Regards
Vignesh


More information about the U-Boot mailing list