From: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
To: Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com,
Wolfram Sang <wsa@kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
Brendan Higgins <brendanhiggins@google.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Lori Hikichi <lori.hikichi@broadcom.com>,
Dhananjay Phadke <dphadke@linux.microsoft.com>,
linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Subject: [PATCH v3 1/6] i2c: iproc: handle Master aborted error
Date: Mon, 2 Nov 2020 09:24:28 +0530 [thread overview]
Message-ID: <20201102035433.6774-2-rayagonda.kokatanur@broadcom.com> (raw)
In-Reply-To: <20201102035433.6774-1-rayagonda.kokatanur@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]
Handle Master aborted error by flushing tx and rx fifo
and reinitializing the hw.
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
---
drivers/i2c/busses/i2c-bcm-iproc.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c
index d8295b1c379d..834a98caeada 100644
--- a/drivers/i2c/busses/i2c-bcm-iproc.c
+++ b/drivers/i2c/busses/i2c-bcm-iproc.c
@@ -93,6 +93,7 @@
#define S_CMD_STATUS_MASK 0x07
#define S_CMD_STATUS_SUCCESS 0x0
#define S_CMD_STATUS_TIMEOUT 0x5
+#define S_CMD_STATUS_MASTER_ABORT 0x7
#define IE_OFFSET 0x38
#define IE_M_RX_FIFO_FULL_SHIFT 31
@@ -311,9 +312,10 @@ static void bcm_iproc_i2c_check_slave_status(
return;
val = (val >> S_CMD_STATUS_SHIFT) & S_CMD_STATUS_MASK;
- if (val == S_CMD_STATUS_TIMEOUT) {
- dev_err(iproc_i2c->device, "slave random stretch time timeout\n");
-
+ if (val == S_CMD_STATUS_TIMEOUT || val == S_CMD_STATUS_MASTER_ABORT) {
+ dev_err(iproc_i2c->device, (val == S_CMD_STATUS_TIMEOUT) ?
+ "slave random stretch time timeout\n" :
+ "Master aborted read transaction\n");
/* re-initialize i2c for recovery */
bcm_iproc_i2c_enable_disable(iproc_i2c, false);
bcm_iproc_i2c_slave_init(iproc_i2c, true);
--
2.17.1
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4187 bytes --]
next prev parent reply other threads:[~2020-11-02 3:54 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 3:54 [PATCH v3 0/6] fix iproc driver to handle master read request Rayagonda Kokatanur
2020-11-02 3:54 ` Rayagonda Kokatanur [this message]
2020-11-02 3:54 ` [PATCH v3 2/6] i2c: iproc: handle only slave interrupts which are enabled Rayagonda Kokatanur
2020-11-02 3:54 ` [PATCH v3 3/6] i2c: iproc: update slave isr mask (ISR_MASK_SLAVE) Rayagonda Kokatanur
2020-11-02 3:54 ` [PATCH v3 4/6] i2c: iproc: fix typo in slave_isr function Rayagonda Kokatanur
2020-11-02 3:54 ` [PATCH v3 5/6] i2c: iproc: handle master read request Rayagonda Kokatanur
2020-11-03 6:19 ` Dhananjay Phadke
2020-11-04 3:35 ` Florian Fainelli
2020-11-04 3:57 ` Rayagonda Kokatanur
2020-11-04 18:01 ` Ray Jui
2020-11-05 7:46 ` Dhananjay Phadke
2020-11-05 9:43 ` Rayagonda Kokatanur
2020-11-06 17:41 ` Dhananjay Phadke
2020-11-10 4:23 ` Rayagonda Kokatanur
2020-11-10 19:24 ` Ray Jui
2020-11-14 1:17 ` Dhananjay Phadke
[not found] ` <CAHO=5PFzd9KTR93ntUvAX5dqzxqJQpVXEirs5uoXdvcnZ7hL4g@mail.gmail.com>
2020-12-02 14:35 ` Wolfram Sang
2020-12-02 17:44 ` Ray Jui
2020-12-17 4:08 ` Rayagonda Kokatanur
2020-12-17 19:11 ` Ray Jui
2020-12-20 7:13 ` Rayagonda Kokatanur
2021-01-05 16:21 ` Wolfram Sang
2021-01-05 17:46 ` Florian Fainelli
2021-01-05 20:50 ` Wolfram Sang
2020-12-02 17:43 ` Ray Jui
2020-11-02 3:54 ` [PATCH v3 6/6] i2c: iproc: handle rx fifo full interrupt Rayagonda Kokatanur
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=20201102035433.6774-2-rayagonda.kokatanur@broadcom.com \
--to=rayagonda.kokatanur@broadcom.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=brendanhiggins@google.com \
--cc=dphadke@linux.microsoft.com \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lori.hikichi@broadcom.com \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.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®