summaryrefslogtreecommitdiff
path: root/cmd/i2c.c
diff options
context:
space:
mode:
authorJianlong Huang <jianlong.huang@starfivetech.com>2022-07-19 09:14:00 +0300
committerHal Feng <hal.feng@starfivetech.com>2023-11-29 05:47:49 +0300
commit77a08d507b6c1efe75b46312394e2f4dd24cc31c (patch)
treeb68277d6f31f7c09c00693568362198ba29636cd /cmd/i2c.c
parent295685561ef1aacb6359a3e658640154e6a40a34 (diff)
downloadu-boot-77a08d507b6c1efe75b46312394e2f4dd24cc31c.tar.xz
cmd: eeprom: Add StarFive VisionFive 2 board support
Rename CONFIG_SYS_DEF_EEPROM_ADDR to CONFIG_SYS_I2C_EEPROM_ADDR based on current usage. Convert CONFIG_SYS_I2C_EEPROM_BUS, CONFIG_SYS_I2C_EEPROM_ADDR_LEN, CONFIG_SYS_EEPROM_SIZE, CONFIG_SYS_EEPROM_PAGE_WRITE_BITS and CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS to Kconfig. Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Diffstat (limited to 'cmd/i2c.c')
-rw-r--r--cmd/i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/i2c.c b/cmd/i2c.c
index c7c08c4e32..cbc8bd008b 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -922,7 +922,7 @@ static int mod_i2c_mem(struct cmd_tbl *cmdtp, int incrflag, int flag, int argc,
if (ret)
return i2c_report_err(ret,
I2C_ERR_WRITE);
-#ifdef CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS
+#if CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS > 0
udelay(CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS * 1000);
#endif
if (incrflag)