summaryrefslogtreecommitdiff
path: root/target/linux/ipq806x/patches-4.9/0008-spi-qup-don-t-re-read-opflags-to-see-if-transaction-.patch
blob: 9893596982b5a3552bbf9ea796b0230ba9ab5427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 9864f39695aefe0831b3c6e86c0dff30489ad580 Mon Sep 17 00:00:00 2001
From: Matthew McClintock <mmcclint@codeaurora.org>
Date: Thu, 10 Mar 2016 16:48:27 -0600
Subject: [PATCH 08/69] spi: qup: don't re-read opflags to see if transaction
 is done for reads

For reads, we will get another interrupt so we need to handle things
then. For writes, we can finish up now.

Signed-off-by: Matthew McClintock <mmcclint@codeaurora.org>
---
 drivers/spi/spi-qup.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/spi/spi-qup.c
+++ b/drivers/spi/spi-qup.c
@@ -567,7 +567,8 @@ static irqreturn_t spi_qup_qup_irq(int i
 	}
 
 	/* re-read opflags as flags may have changed due to actions above */
-	opflags = readl_relaxed(controller->base + QUP_OPERATIONAL);
+	if (opflags & QUP_OP_OUT_SERVICE_FLAG)
+		opflags = readl_relaxed(controller->base + QUP_OPERATIONAL);
 
 	if ((controller->rx_bytes == xfer->len &&
 		(opflags & QUP_OP_MAX_INPUT_DONE_FLAG)) ||  error)