diff options
author | Hans de Goede <hdegoede@redhat.com> | 2016-01-26 16:51:14 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2016-01-26 17:58:02 +0100 |
commit | 2ca02995791484007373ae51b3e7148511f1479b (patch) | |
tree | 375170ec958bb350bd5b193d99429925f5a43ea1 /drivers/i2c | |
parent | 54be0f057825b886af008d8d43a97802e5537ab6 (diff) | |
download | u-boot-imx-2ca02995791484007373ae51b3e7148511f1479b.zip u-boot-imx-2ca02995791484007373ae51b3e7148511f1479b.tar.gz u-boot-imx-2ca02995791484007373ae51b3e7148511f1479b.tar.bz2 |
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/mvtwsi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c index 5f993b9..221ff4f 100644 --- a/drivers/i2c/mvtwsi.c +++ b/drivers/i2c/mvtwsi.c @@ -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); } |