spi: qup: fix PIO/DMA transfers.
authorJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Mon, 10 Jun 2019 07:22:43 +0000 (09:22 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 13 Jun 2019 15:51:29 +0000 (16:51 +0100)
commita75e91bad717fea43358e7f743de5f93c4e5978f
tree7335b4583cf11b120a9ac447ea1f3e92f692c3d5
parentf3440d9a0da292dc4998d9393162fcfb996fd671
spi: qup: fix PIO/DMA transfers.

- DMA/PIO:
  If an error IRQ occurred during PIO or DMA mode make sure to log it so
on completion the transfer can be marked as an error.

- PIO:
  Do not complete a transaction until all data has been transferred or
an error IRQ was flagged.

1) If there was no error IRQ, ignore the done flag IRQ
(QUP_OP_MAX_INPUT_DONE_FLAG) until all data for the transfer has been
processed: not doing so risks completing the transfer returning
uninitialized data in the buffers.

2) Under stress testing we have identified the need to
protect read/write operations against spurious IN/OUT service events.

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-qup.c