diff options
author | Simon Glass <sjg@chromium.org> | 2020-01-23 11:48:07 -0700 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2020-01-27 07:19:00 +0100 |
commit | 6db7943b92f7a4b5858b6a68f137462ed0293e09 (patch) | |
tree | 07cd07098577694690fb57180d3972520c4d40fb /drivers/i2c/designware_i2c.c | |
parent | afb88651a689aa0aed67c4cf439f1dc0d8803d5a (diff) | |
download | u-boot-6db7943b92f7a4b5858b6a68f137462ed0293e09.zip u-boot-6db7943b92f7a4b5858b6a68f137462ed0293e09.tar.gz u-boot-6db7943b92f7a4b5858b6a68f137462ed0293e09.tar.bz2 |
i2c: designware_i2c: Rename 'max' speed to 'high' speed
Some SoCs support a higher speed than what is currently called 'max' in
this driver. Rename it to 'high' speed, which is the official name of the
3.4MHz speed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jun Chen <ptchentw@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/i2c/designware_i2c.c')
-rw-r--r-- | drivers/i2c/designware_i2c.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/designware_i2c.c b/drivers/i2c/designware_i2c.c index 138fc72..dd1cc0b 100644 --- a/drivers/i2c/designware_i2c.c +++ b/drivers/i2c/designware_i2c.c @@ -62,10 +62,10 @@ static unsigned int __dw_i2c_set_bus_speed(struct i2c_regs *i2c_base, unsigned int ena; int i2c_spd; - /* Allow max speed if there is no config, or the config allows it */ - if (speed >= I2C_MAX_SPEED && - (!scl_sda_cfg || scl_sda_cfg->has_max_speed)) - i2c_spd = IC_SPEED_MODE_MAX; + /* Allow high speed if there is no config, or the config allows it */ + if (speed >= I2C_HIGH_SPEED && + (!scl_sda_cfg || scl_sda_cfg->has_high_speed)) + i2c_spd = IC_SPEED_MODE_HIGH; else if (speed >= I2C_FAST_SPEED) i2c_spd = IC_SPEED_MODE_FAST; else @@ -80,7 +80,7 @@ static unsigned int __dw_i2c_set_bus_speed(struct i2c_regs *i2c_base, cntl = (readl(&i2c_base->ic_con) & (~IC_CON_SPD_MSK)); switch (i2c_spd) { - case IC_SPEED_MODE_MAX: + case IC_SPEED_MODE_HIGH: cntl |= IC_CON_SPD_SS; if (scl_sda_cfg) { hcnt = scl_sda_cfg->fs_hcnt; |