diff options
author | Tom Rini <trini@konsulko.com> | 2019-05-03 14:22:23 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-05-03 14:22:23 -0400 |
commit | 90c2ebd2156982eee1af6faa00f6740e9f79b3c5 (patch) | |
tree | 65408be4e60989d77b7b65f7cf5cb0e697b0b62d /drivers/i2c/mvtwsi.c | |
parent | b362fe0848df60569bdb867b7627151747eb6e23 (diff) | |
parent | 5859a39a43d15cb775478bd4537e9a2eac1c4cf2 (diff) |
Merge git://git.denx.de/u-boot-marvell
- Fix in kwbimage (return code checking) (Young Xiao)
- Misc updates to Turris Omnia (Marek)
Diffstat (limited to 'drivers/i2c/mvtwsi.c')
-rw-r--r-- | drivers/i2c/mvtwsi.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c index 74ac0a4aa7..0a2dafcec6 100644 --- a/drivers/i2c/mvtwsi.c +++ b/drivers/i2c/mvtwsi.c @@ -271,6 +271,17 @@ static int twsi_wait(struct mvtwsi_registers *twsi, int expected_status, do { control = readl(&twsi->control); if (control & MVTWSI_CONTROL_IFLG) { + /* + * On Armada 38x it seems that the controller works as + * if it first set the MVTWSI_CONTROL_IFLAG in the + * control register and only after that it changed the + * status register. + * This sometimes caused weird bugs which only appeared + * on selected I2C speeds and even then only sometimes. + * We therefore add here a simple ndealy(100), which + * seems to fix this weird bug. + */ + ndelay(100); status = readl(&twsi->status); if (status == expected_status) return 0; |