diff options
author | Tom Rini <trini@konsulko.com> | 2018-02-19 09:50:18 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-02-19 09:50:18 -0500 |
commit | 60a53351fb1500a7657973ecc5a96f02e04ea48f (patch) | |
tree | bcf6b89f649d5725cd328ad759b773e744d22773 /drivers | |
parent | 3ffa5288c86e4cd97940313ad408da88db841826 (diff) | |
parent | 004b4cdaeca45d4702f0494f517b6fc472ccf4a1 (diff) | |
download | u-boot-60a53351fb1500a7657973ecc5a96f02e04ea48f.tar.gz u-boot-60a53351fb1500a7657973ecc5a96f02e04ea48f.tar.xz u-boot-60a53351fb1500a7657973ecc5a96f02e04ea48f.zip |
Merge git://git.denx.de/u-boot-i2c
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/mvtwsi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c index 30bee0d52e..38bca89745 100644 --- a/drivers/i2c/mvtwsi.c +++ b/drivers/i2c/mvtwsi.c @@ -487,11 +487,14 @@ static uint __twsi_i2c_set_bus_speed(struct mvtwsi_registers *twsi, static void __twsi_i2c_init(struct mvtwsi_registers *twsi, int speed, int slaveadd, uint *actual_speed) { + uint tmp_speed; + /* Reset controller */ twsi_reset(twsi); /* Set speed */ + tmp_speed = __twsi_i2c_set_bus_speed(twsi, speed); if (actual_speed) - *actual_speed = __twsi_i2c_set_bus_speed(twsi, speed); + *actual_speed = tmp_speed; /* Set slave address; even though we don't use it */ writel(slaveadd, &twsi->slave_address); writel(0, &twsi->xtnd_slave_addr); |