mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
spi: imx: use PIO mode if size is small
Use PIO mode instead if size is smaller than fifo size, since dma may be less efficient. Signed-off-by: Robin Gong <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
5ba5a37306
commit
133eb8e38b
1 changed files with 3 additions and 0 deletions
|
|
@ -224,6 +224,9 @@ static bool spi_imx_can_dma(struct spi_master *master, struct spi_device *spi,
|
|||
if (spi_imx->slave_mode)
|
||||
return false;
|
||||
|
||||
if (transfer->len < spi_imx->devtype_data->fifo_size)
|
||||
return false;
|
||||
|
||||
spi_imx->dynamic_burst = 0;
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue