From: Sai Pavan Boddu <sai.pavan.boddu@amd.com>
To: <linux-kernel@vger.kernel.org>, <linux-i2c@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Cc: Michal Simek <michal.simek@amd.com>,
Andi Shyti <andi.shyti@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Wolfram Sang <wsa@kernel.org>
Subject: [PATCH] i2c: cadence: Avoid fifo clear after start
Date: Fri, 5 Jan 2024 18:22:58 +0530 [thread overview]
Message-ID: <20240105125258.2470397-1-sai.pavan.boddu@amd.com> (raw)
Driver unintentionally programs ctrl reg to clear fifo which is
happening after start of transaction, this was not the case previously
as it was read-modified-write. This issue breaks i2c reads on QEMU as
i2c-read is done before guest starts programming ctrl register.
Fixes: ff0cf7bca6309 ("i2c: cadence: Remove unnecessary register reads")
Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@amd.com>
---
drivers/i2c/busses/i2c-cadence.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c
index de3f58b60dce..6f7d753a8197 100644
--- a/drivers/i2c/busses/i2c-cadence.c
+++ b/drivers/i2c/busses/i2c-cadence.c
@@ -633,6 +633,7 @@ static void cdns_i2c_mrecv(struct cdns_i2c *id)
if (hold_clear) {
ctrl_reg &= ~CDNS_I2C_CR_HOLD;
+ ctrl_reg &= ~CDNS_I2C_CR_CLR_FIFO;
/*
* In case of Xilinx Zynq SOC, clear the HOLD bit before transfer size
* register reaches '0'. This is an IP bug which causes transfer size
--
2.25.1
next reply other threads:[~2024-01-05 12:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 12:52 Sai Pavan Boddu [this message]
2024-01-10 16:00 ` Michal Simek
2024-01-17 13:19 ` Andi Shyti
2024-01-17 18:06 ` Boddu, Sai Pavan
2024-01-17 21:05 ` Andi Shyti
2024-05-03 9:05 ` Boddu, Sai Pavan
2024-05-03 10:48 ` Andi Shyti
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=20240105125258.2470397-1-sai.pavan.boddu@amd.com \
--to=sai.pavan.boddu@amd.com \
--cc=andi.shyti@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=wsa@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®