summaryrefslogtreecommitdiff
path: root/board/keymile
diff options
context:
space:
mode:
Diffstat (limited to 'board/keymile')
-rw-r--r--board/keymile/common/ivm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c
index a14496f..ac3cc9c 100644
--- a/board/keymile/common/ivm.c
+++ b/board/keymile/common/ivm.c
@@ -315,16 +315,13 @@ int ivm_analyze_eeprom(unsigned char *buf, int len)
int ivm_read_eeprom(void)
{
uchar i2c_buffer[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
- char *buf;
- unsigned long dev_addr = CONFIG_SYS_IVM_EEPROM_ADR;
int ret;
- buf = getenv("EEprom_ivm");
- i2c_set_bus_num(buf ? (int)simple_strtol(buf, NULL, 10) : 0);
+ i2c_set_bus_num(CONFIG_KM_IVM_BUS);
/* add deblocking here */
i2c_make_abort();
- ret = i2c_read(dev_addr, 0, 1, i2c_buffer,
+ ret = i2c_read(CONFIG_SYS_IVM_EEPROM_ADR, 0, 1, i2c_buffer,
CONFIG_SYS_IVM_EEPROM_MAX_LEN);
if (ret != 0) {
printf("Error reading EEprom\n");