From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vignesh R Date: Mon, 6 Jul 2015 11:04:48 +0530 Subject: [U-Boot] [PATCH 08/11] spi: ti_qspi: Use DMA to read from qspi flash In-Reply-To: <5597D730.1080301@ti.com> References: <1435922173-6531-1-git-send-email-vigneshr@ti.com> <1435922173-6531-9-git-send-email-vigneshr@ti.com> <20150703114223.GA23886@bill-the-cat> <5597D730.1080301@ti.com> Message-ID: <559A1378.3020807@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 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 >> >> 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