]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
spi: spi-zynqmp-gqspi: use dma mode only if the buffer is not vmalloced
authorTejas Prajapati Rameshchandra <tejas.prajapati.rameshchandra@xilinx.com>
Tue, 15 May 2018 12:37:17 +0000 (18:07 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 15 May 2018 15:22:33 +0000 (17:22 +0200)
commitc3ad4b9f92cef73b118446312f39f2dbe9fc0ff1
treee3d3f0d984c04324278a6474f40d70bfef4d438f
parentf3d40d3ff7b5b421cdbd79909954d957f12da530
spi: spi-zynqmp-gqspi: use dma mode only if the buffer is not vmalloced

As per the kernel documentation the buffer to be used with dma
should not be vmalloced due to the fact that if buffer is vmalloced
then page entries are not consistent in physical pages. That would
lead to failure cases in dma. This patch adds condition to check
if the buffer to be read is vmalloced or not if not vmalloced then
uses dma mode otherwise io mode.

Signed-off-by: Tejas Prajapati Rameshchandra <tejas.prajapati.rameshchandra@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/spi/spi-zynqmp-gqspi.c