summaryrefslogtreecommitdiff
path: root/drivers/i2c/davinci_i2c.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-12-05 21:04:24 -0500
committerTom Rini <trini@konsulko.com>2022-12-05 21:04:24 -0500
commitd2ad92927ea91ab8cece92a308350602c594dd3e (patch)
tree23ec41dc6f0aff10b800c69396a32ac5ac926817 /drivers/i2c/davinci_i2c.c
parent1c470f32f74248ff4aa145bf033fb6524dc7fc2e (diff)
parent7102d324f6b41741ee74587d43d77b302b1bbd96 (diff)
Merge branch '2022-12-05-Kconfig-migrations-and-renames' into next
- First batch of the patches that end up with scripts/config_whitelist.tx being empty. Mostly migrations and a little bit of code removal and CFG renaming.
Diffstat (limited to 'drivers/i2c/davinci_i2c.c')
-rw-r--r--drivers/i2c/davinci_i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index ae177227dea..25ef937dc0b 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -91,7 +91,7 @@ static uint _davinci_i2c_setspeed(struct i2c_regs *i2c_base,
psc = 2;
/* SCLL + SCLH */
- div = (CONFIG_SYS_HZ_CLOCK / ((psc + 1) * speed)) - 10;
+ div = (CFG_SYS_HZ_CLOCK / ((psc + 1) * speed)) - 10;
REG(&(i2c_base->i2c_psc)) = psc; /* 27MHz / (2 + 1) = 9MHz */
REG(&(i2c_base->i2c_scll)) = (div * 50) / 100; /* 50% Duty */
REG(&(i2c_base->i2c_sclh)) = div - REG(&(i2c_base->i2c_scll));