ipq: more v4.9 fixes
[openwrt/staging/blogic.git] / target / linux / ipq806x / patches-4.9 / 0008-spi-qup-don-t-re-read-opflags-to-see-if-transaction-.patch
1 From 9864f39695aefe0831b3c6e86c0dff30489ad580 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 08/69] spi: qup: don't re-read opflags to see if transaction
5 is done for reads
6
7 For reads, we will get another interrupt so we need to handle things
8 then. For writes, we can finish up now.
9
10 Signed-off-by: Matthew McClintock <mmcclint@codeaurora.org>
11 ---
12 drivers/spi/spi-qup.c | 3 ++-
13 1 file changed, 2 insertions(+), 1 deletion(-)
14
15 diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c
16 index d0cbb37d53b0..5b41026285dd 100644
17 --- a/drivers/spi/spi-qup.c
18 +++ b/drivers/spi/spi-qup.c
19 @@ -567,7 +567,8 @@ static irqreturn_t spi_qup_qup_irq(int irq, void *dev_id)
20 }
21
22 /* re-read opflags as flags may have changed due to actions above */
23 - opflags = readl_relaxed(controller->base + QUP_OPERATIONAL);
24 + if (opflags & QUP_OP_OUT_SERVICE_FLAG)
25 + opflags = readl_relaxed(controller->base + QUP_OPERATIONAL);
26
27 if ((controller->rx_bytes == xfer->len &&
28 (opflags & QUP_OP_MAX_INPUT_DONE_FLAG)) || error)
29 --
30 2.11.0
31