From: Eddie James <eajames@linux.ibm.com>
To: openbmc@lists.ozlabs.org
Cc: joel@jms.id.au, Eddie James <eajames@linux.ibm.com>
Subject: [PATCH linux dev-5.3] i2c: fsi: Increase performance
Date: Mon, 4 Nov 2019 14:12:30 -0600 [thread overview]
Message-ID: <20191104201230.1423-1-eajames@linux.ibm.com> (raw)
Usleep_range is holding back performance too much with the current
polling method, so remove it. In addition, reduce the default clock
divider to 3. And fix a bug where timeouts aren't cleaned up.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
---
drivers/i2c/busses/i2c-fsi.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-fsi.c b/drivers/i2c/busses/i2c-fsi.c
index da5eb3960def..22b79f995d2b 100644
--- a/drivers/i2c/busses/i2c-fsi.c
+++ b/drivers/i2c/busses/i2c-fsi.c
@@ -27,7 +27,7 @@
#define FSI_ENGID_I2C 0x7
-#define I2C_DEFAULT_CLK_DIV 6
+#define I2C_DEFAULT_CLK_DIV 3
/* i2c registers */
#define I2C_FSI_FIFO 0x00
@@ -592,14 +592,11 @@ static int fsi_i2c_wait(struct fsi_i2c_port *port, struct i2c_msg *msg,
/* cmd complete and all data xfrd */
if (rc == msg->len)
return 0;
-
- /* need to xfr more data, but maybe don't need wait */
- continue;
}
-
- usleep_range(I2C_CMD_SLEEP_MIN_US, I2C_CMD_SLEEP_MAX_US);
} while (time_after(start + timeout, jiffies));
+ fsi_i2c_abort(port, 0);
+
return -ETIMEDOUT;
}
--
2.23.0
reply other threads:[~2019-11-04 20:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20191104201230.1423-1-eajames@linux.ibm.com \
--to=eajames@linux.ibm.com \
--cc=joel@jms.id.au \
--cc=openbmc@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.