summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-05-03 21:22:23 +0300
committerTom Rini <trini@konsulko.com>2019-05-03 21:22:23 +0300
commit90c2ebd2156982eee1af6faa00f6740e9f79b3c5 (patch)
tree65408be4e60989d77b7b65f7cf5cb0e697b0b62d /drivers
parentb362fe0848df60569bdb867b7627151747eb6e23 (diff)
parent5859a39a43d15cb775478bd4537e9a2eac1c4cf2 (diff)
downloadu-boot-90c2ebd2156982eee1af6faa00f6740e9f79b3c5.tar.xz
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')
-rw-r--r--drivers/i2c/mvtwsi.c11
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;