This driver checks the length of transfer to be made and based
on this information, either chooses to transfer data via DMA or
PIO. Decrement this border further to gain better performace eg.
during SPI flash writes.

Empiric measurement shows that this gives extra 3kB/s write speed
with a M25P80 flash clocked at 40MHz.

Signed-off-by: Marek Vasut <ma...@denx.de>
Cc: Chris Ball <c...@laptop.org>
Cc: Fabio Estevam <fabio.este...@freescale.com>
Cc: Grant Likely <grant.lik...@secretlab.ca>
Cc: Mark Brown <broo...@opensource.wolfsonmicro.com>
Cc: Shawn Guo <shawn....@linaro.org>
---
 drivers/spi/spi-mxs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
index 282bdd7..6650ded 100644
--- a/drivers/spi/spi-mxs.c
+++ b/drivers/spi/spi-mxs.c
@@ -445,7 +445,7 @@ static int mxs_spi_transfer_one(struct spi_master *master,
                 * DMA only: 2.164808 seconds, 473.0KB/s
                 * Combined: 1.676276 seconds, 610.9KB/s
                 */
-               if (t->len <= 256) {
+               if (t->len < 32) {
                        writel(BM_SSP_CTRL1_DMA_ENABLE,
                                ssp->base + HW_SSP_CTRL1(ssp) +
                                STMP_OFFSET_REG_CLR);
-- 
1.7.10.4


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to