6eb2d6a7b100eb53c93b947347408cd4aac603c0
[openwrt/staging/robimarko.git] /
1 From 7e6c35fe602df6821b3e7db5b1ba656162750fda Mon Sep 17 00:00:00 2001
2 From: Abhishek Sahu <absahu@codeaurora.org>
3 Date: Mon, 12 Mar 2018 18:44:55 +0530
4 Subject: [PATCH 06/13] i2c: qup: fix the transfer length for BAM RX EOT FLUSH
5 tags
6
7 In case of FLUSH operation, BAM copies INPUT EOT FLUSH (0x94)
8 instead of normal EOT (0x93) tag in input data stream when an
9 input EOT tag is received during flush operation. So only one tag
10 will be written instead of 2 separate tags.
11
12 Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
13 Reviewed-by: Andy Gross <andy.gross@linaro.org>
14 Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
15 ---
16 drivers/i2c/busses/i2c-qup.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19 --- a/drivers/i2c/busses/i2c-qup.c
20 +++ b/drivers/i2c/busses/i2c-qup.c
21 @@ -774,10 +774,10 @@ static int qup_i2c_bam_do_xfer(struct qu
22 qup->btx.tag.start[0] = QUP_BAM_INPUT_EOT;
23 len++;
24
25 - /* scratch buf to read the BAM EOT and FLUSH tags */
26 + /* scratch buf to read the BAM EOT FLUSH tags */
27 ret = qup_sg_set_buf(&qup->brx.sg[rx_cnt++],
28 &qup->brx.tag.start[0],
29 - 2, qup, DMA_FROM_DEVICE);
30 + 1, qup, DMA_FROM_DEVICE);
31 if (ret)
32 return ret;
33 }