mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 08:01:08 +00:00
mvtwsi: Fix breakage introduced by "Fix mvtwsi not working on sun6i and newer sunxi SoCs"
"Fix mvtwsi not working on sun6i and newer sunxi SoCs" includes the following: @@ -189,7 +200,8 @@ static int twsi_start(struct i2c_adapter *adap, int expected_status) /* globally set TWSIEN in case it was not */ twsi_control_flags |= MVTWSI_CONTROL_TWSIEN; /* assert START */ - writel(twsi_control_flags | MVTWSI_CONTROL_START, &twsi->control); + twsi_control_flags |= MVTWSI_CONTROL_START | MVTWSI_CONTROL_CLEAR_IFLG; + writel(twsi_control_flags, &twsi->control); /* wait for controller to process START */ return twsi_wait(adap, expected_status); } The modification of twsi_control_flags done here was introduced while merging to fix a line > 80 chars, but twsi_control_flags is a global variable and should not be modified like this here, this commit fixes this, restoring mvtwsi functionality. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
54be0f0578
commit
2ca0299579
1 changed files with 2 additions and 2 deletions
|
@ -204,8 +204,8 @@ static int twsi_start(struct i2c_adapter *adap, int expected_status)
|
|||
/* globally set TWSIEN in case it was not */
|
||||
twsi_control_flags |= MVTWSI_CONTROL_TWSIEN;
|
||||
/* assert START */
|
||||
twsi_control_flags |= MVTWSI_CONTROL_START | MVTWSI_CONTROL_CLEAR_IFLG;
|
||||
writel(twsi_control_flags, &twsi->control);
|
||||
writel(twsi_control_flags | MVTWSI_CONTROL_START |
|
||||
MVTWSI_CONTROL_CLEAR_IFLG, &twsi->control);
|
||||
/* wait for controller to process START */
|
||||
return twsi_wait(adap, expected_status);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue