@@ -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;
}
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(-)