From mboxrd@z Thu Jan 1 00:00:00 1970 From: R, Vignesh Date: Sat, 4 Jul 2015 18:23:04 +0530 Subject: [U-Boot] [PATCH 08/11] spi: ti_qspi: Use DMA to read from qspi flash In-Reply-To: <20150703114223.GA23886@bill-the-cat> References: <1435922173-6531-1-git-send-email-vigneshr@ti.com> <1435922173-6531-9-git-send-email-vigneshr@ti.com> <20150703114223.GA23886@bill-the-cat> Message-ID: <5597D730.1080301@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > 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