summaryrefslogtreecommitdiff
path: root/drivers/i2c/mv_i2c.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-01-29 09:34:13 -0500
committerTom Rini <trini@konsulko.com>2020-01-29 09:34:13 -0500
commite7ab1cb3f0421ad8e8435a8258790e238c623ea2 (patch)
treefb2e7cce740a30f137dcdce0d2f4b2512ae58498 /drivers/i2c/mv_i2c.c
parent3e12744a90241b08788ab7f20b5437381dbc9f68 (diff)
parent2034f6c27fc91407fe8bbd36670714b77d9ef1dc (diff)
Merge tag 'for-v2020.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
i2c changes for 2020.04 - updates the Designware I2C driver - get timings from device tree - handle units in nanoseconds - make sure that the requested bus speed is not exceeded - few smaller clean-ups - adds enums for i2c speed and update drivers which use them - global_data: remove unused mxc_i2c specific field
Diffstat (limited to 'drivers/i2c/mv_i2c.c')
-rw-r--r--drivers/i2c/mv_i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/mv_i2c.c b/drivers/i2c/mv_i2c.c
index 8a56ef9a24..63665f0952 100644
--- a/drivers/i2c/mv_i2c.c
+++ b/drivers/i2c/mv_i2c.c
@@ -434,7 +434,7 @@ void i2c_init(int speed, int slaveaddr)
base_glob = (struct mv_i2c *)CONFIG_MV_I2C_REG;
#endif
- if (speed > 100000)
+ if (speed > I2C_SPEED_STANDARD_RATE)
val = ICR_FM;
else
val = ICR_SM;
@@ -565,7 +565,7 @@ static int mv_i2c_set_bus_speed(struct udevice *bus, unsigned int speed)
struct mv_i2c_priv *priv = dev_get_priv(bus);
u32 val;
- if (speed > 100000)
+ if (speed > I2C_SPEED_STANDARD_RATE)
val = ICR_FM;
else
val = ICR_SM;