MLK-10404-1 spi: spi-imx: use XCH mode even in DMA mode
authorRobin Gong <b38343@freescale.com>
Wed, 11 Mar 2015 06:58:18 +0000 (14:58 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:40 +0000 (15:21 -0500)
commit40c2c5ec3a6b46f74fcb5be7bfa27e425640cdad
tree2c6a785af808a592180ab443fdf7ca89bf40912a
parentd6187c4afddd6bf636e59c7f18a0c2d52edd5747
MLK-10404-1 spi: spi-imx: use XCH mode even in DMA mode

To workaroud the TKT238285, the safe way is use XCH mode in SDMA
script to simulate as PIO mode which never report such issue. Meanwhile,
set tx threashold as 0. But this workaroud will bring performance impacted,
below performance data is collected by 'dd' with SPI-NOR flash on i.mx6dl
sabresd board:

  mode                   write data            read data
--PIO                     194KB/s              644KB/s
--DMA normal
  (SMC, tx_thresh=32)     222KB/s              1.4MB/s
--DMA(XCH, tx_thresh=0)   210KB/s              1.0MB/s

Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit 01be65fa5617aa192307ca38b6fc6128f3f0c3f7)
(cherry picked from commit 646a751a4d1d0e227a762b461d9b8f92605c26b1)
(cherry picked from commit b334993950b24ced30fcfc70c126b65bf4cb4cff)

Conflicts:
drivers/spi/spi-imx.c
drivers/spi/spi-imx.c