715-spi-qup-don-t-re-read-opflags-to-see-if-transaction-.patch 1020 B

123456789101112131415161718192021222324252627
  1. From f57ff801665b868d8607c9e872466b54982564bc Mon Sep 17 00:00:00 2001
  2. From: Matthew McClintock <mmcclint@codeaurora.org>
  3. Date: Thu, 10 Mar 2016 16:48:27 -0600
  4. Subject: [PATCH] spi: qup: don't re-read opflags to see if transaction is done
  5. for reads
  6. For reads, we will get another interrupt so we need to handle things
  7. then. For writes, we can finish up now.
  8. Change-Id: I4fa95ae7bb9d78f8ba54c613b981b37d4ea81d7e
  9. Signed-off-by: Matthew McClintock <mmcclint@codeaurora.org>
  10. ---
  11. drivers/spi/spi-qup.c | 3 ++-
  12. 1 file changed, 2 insertions(+), 1 deletion(-)
  13. --- a/drivers/spi/spi-qup.c
  14. +++ b/drivers/spi/spi-qup.c
  15. @@ -569,7 +569,8 @@ static irqreturn_t spi_qup_qup_irq(int i
  16. }
  17. /* re-read opflags as flags may have changed due to actions above */
  18. - opflags = readl_relaxed(controller->base + QUP_OPERATIONAL);
  19. + if (opflags & QUP_OP_OUT_SERVICE_FLAG)
  20. + opflags = readl_relaxed(controller->base + QUP_OPERATIONAL);
  21. if ((controller->rx_bytes == xfer->len &&
  22. (opflags & QUP_OP_MAX_INPUT_DONE_FLAG)) || error)