ipq806x: add v4.9 support
[openwrt/openwrt.git] / target / linux / ipq806x / patches-4.9 / 0011-spi-qup-don-t-re-read-opflags-to-see-if-transaction-.patch
1 From ba96e9449a63acd658d8ad0a5b3755b559410999 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 11/37] 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 --- a/drivers/spi/spi-qup.c
16 +++ b/drivers/spi/spi-qup.c
17 @@ -567,7 +567,8 @@ static irqreturn_t spi_qup_qup_irq(int i
18 }
19
20 /* re-read opflags as flags may have changed due to actions above */
21 - opflags = readl_relaxed(controller->base + QUP_OPERATIONAL);
22 + if (opflags & QUP_OP_OUT_SERVICE_FLAG)
23 + opflags = readl_relaxed(controller->base + QUP_OPERATIONAL);
24
25 if ((controller->rx_bytes == xfer->len &&
26 (opflags & QUP_OP_MAX_INPUT_DONE_FLAG)) || error)