未验证 提交 133eb8e3 编写于 作者: R Robin Gong 提交者: Mark Brown

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: NRobin Gong <yibin.gong@nxp.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 5ba5a373
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册