From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Andi Shyti <andi.shyti@kernel.org>,
Viken Dadhaniya <quic_vdadhani@quicinc.com>
Cc: andersson@kernel.org, konrad.dybcio@linaro.org,
linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org, vkoul@kernel.org,
quic_bjorande@quicinc.com, manivannan.sadhasivam@linaro.org,
quic_msavaliy@quicinc.com, quic_vtanuku@quicinc.com
Subject: Re: [V2] i2c: i2c-qcom-geni: Correct I2C TRE sequence
Date: Tue, 30 Jan 2024 11:32:28 +0000 [thread overview]
Message-ID: <56f08eaf-079c-4076-b900-710884db6ca5@linaro.org> (raw)
In-Reply-To: <lib6m2bty4uilvvu544sjlezeux7ne4cx5i25j6yndicx7miaw@tvxpuekiczwh>
On 29/01/2024 23:24, Andi Shyti wrote:
> Hi Viken,
>
> as Bryan has done some comments in version 1, please, Cc him to
> this patch.
>
> On Mon, Jan 29, 2024 at 11:40:03AM +0530, Viken Dadhaniya wrote:
>> For i2c read operation, we are getting gsi mode timeout due
>> to malformed TRE(Transfer Ring Element). Currently we are
>> configuring incorrect TRE sequence in gpi driver
>> (drivers/dma/qcom/gpi.c) as below
>>
>> - Sets up CONFIG
>> - Sets up DMA tre
>> - Sets up GO tre
>>
>> As per HPG(Hardware programming guide), We should configure TREs in below
>> sequence for any i2c transfer
>>
>> - Sets up CONFIG tre
>> - Sets up GO tre
>> - Sets up DMA tre
>>
>> For only write operation or write followed by read operation,
>> existing software sequence is correct.
>>
>> for only read operation, TRE sequence need to be corrected.
>> Hence, we have changed the sequence to submit GO tre before DMA tre.
>>
>> Tested covering i2c read/write transfer on QCM6490 RB3 board.
>>
>> Signed-off-by: Viken Dadhaniya <quic_vdadhani@quicinc.com>
>> Fixes: commit d8703554f4de ("i2c: qcom-geni: Add support for GPI DMA")
>
> The format is:
>
> Fixes: d8703554f4de ("i2c: qcom-geni: Add support for GPI DMA")
>
> and goes above the SoB.
>
>> ---
>> v1 -> v2:
>> - Remove redundant check.
>> - update commit log.
>> - add fix tag.
>> ---
>> ---
>> drivers/i2c/busses/i2c-qcom-geni.c | 14 +++++++-------
>> 1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
>> index 0d2e7171e3a6..da94df466e83 100644
>> --- a/drivers/i2c/busses/i2c-qcom-geni.c
>> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
>> @@ -613,20 +613,20 @@ static int geni_i2c_gpi_xfer(struct geni_i2c_dev *gi2c, struct i2c_msg msgs[], i
>>
>> peripheral.addr = msgs[i].addr;
>>
>> + ret = geni_i2c_gpi(gi2c, &msgs[i], &config,
>> + &tx_addr, &tx_buf, I2C_WRITE, gi2c->tx_c);
>> + if (ret)
>> + goto err;
>> +
>> if (msgs[i].flags & I2C_M_RD) {
>> ret = geni_i2c_gpi(gi2c, &msgs[i], &config,
>> &rx_addr, &rx_buf, I2C_READ, gi2c->rx_c);
>> if (ret)
>> goto err;
>> - }
>> -
>> - ret = geni_i2c_gpi(gi2c, &msgs[i], &config,
>> - &tx_addr, &tx_buf, I2C_WRITE, gi2c->tx_c);
>> - if (ret)
>> - goto err;
>>
>> - if (msgs[i].flags & I2C_M_RD)
>> dma_async_issue_pending(gi2c->rx_c);
>> + }
>> +
>
> Bryan, could you please check here?
>
> Thanks for your review!
>
> Andi
Assuming the Fixes tag is fixed.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # qrb5165-rb5
---
bod
next prev parent reply other threads:[~2024-01-30 11:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 6:10 Viken Dadhaniya
2024-01-29 23:24 ` Andi Shyti
2024-01-30 11:32 ` Bryan O'Donoghue [this message]
2024-02-01 10:17 ` Viken Dadhaniya
2024-01-29 23:49 ` Dmitry Baryshkov
2024-01-30 9:42 ` Andi Shyti
2024-02-01 10:21 ` Viken Dadhaniya
2024-02-01 10:19 ` Viken Dadhaniya
2024-01-30 15:24 ` Bryan O'Donoghue
2024-02-01 10:23 ` Viken Dadhaniya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56f08eaf-079c-4076-b900-710884db6ca5@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=andersson@kernel.org \
--cc=andi.shyti@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=quic_bjorande@quicinc.com \
--cc=quic_msavaliy@quicinc.com \
--cc=quic_vdadhani@quicinc.com \
--cc=quic_vtanuku@quicinc.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®