Merge git://git.denx.de/u-boot-marvell

- Fix in kwbimage (return code checking) (Young Xiao)
- Misc updates to Turris Omnia (Marek)
This commit is contained in:
Tom Rini
2019-05-03 14:22:23 -04:00
7 changed files with 231 additions and 198 deletions

View File

@@ -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;