diff options
author | Tom Rini <trini@konsulko.com> | 2019-12-11 08:17:19 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-12-11 08:17:19 -0500 |
commit | 3031cdede17f5311a0c1cc4279ea22fd3d02ce73 (patch) | |
tree | c275a044c47966ad991af851b4a9336805a846e4 /drivers/i2c | |
parent | addb1d9f5d63f4586fa4a0ad24a9eaae35331783 (diff) | |
parent | 3104162a8b967919d2b65211650299018e10c61e (diff) |
Merge tag 'fix-for-2020.01' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
i2c bugfixes for 2020.01
- i2c: i2c_cdns: fix write timeout on fifo boundary
fixes timout issue when writting number of bytes is multiple
of the FIFO depth.
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/i2c-cdns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-cdns.c b/drivers/i2c/i2c-cdns.c index 2c0301ad08..ff3956d8c2 100644 --- a/drivers/i2c/i2c-cdns.c +++ b/drivers/i2c/i2c-cdns.c @@ -265,7 +265,7 @@ static int cdns_i2c_write_data(struct i2c_cdns_bus *i2c_bus, u32 addr, u8 *data, while (len-- && !is_arbitration_lost(regs)) { writel(*(cur_data++), ®s->data); - if (readl(®s->transfer_size) == CDNS_I2C_FIFO_DEPTH) { + if (len && readl(®s->transfer_size) == CDNS_I2C_FIFO_DEPTH) { ret = cdns_i2c_wait(regs, CDNS_I2C_INTERRUPT_COMP | CDNS_I2C_INTERRUPT_ARBLOST); if (ret & CDNS_I2C_INTERRUPT_ARBLOST) |