summaryrefslogtreecommitdiff
path: root/board/keymile/common/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/keymile/common/common.c')
-rw-r--r--board/keymile/common/common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c
index c3fa8443d0..b2bd7fd843 100644
--- a/board/keymile/common/common.c
+++ b/board/keymile/common/common.c
@@ -295,11 +295,14 @@ int ivm_analyze_eeprom (unsigned char *buf, int len)
int ivm_read_eeprom (void)
{
+#if defined(CONFIG_I2C_MUX)
I2C_MUX_DEVICE *dev = NULL;
+#endif
uchar i2c_buffer[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
uchar *buf;
unsigned dev_addr = CONFIG_SYS_IVM_EEPROM_ADR;
+#if defined(CONFIG_I2C_MUX)
/* First init the Bus, select the Bus */
#if defined(CONFIG_SYS_I2C_IVM_BUS)
dev = i2c_mux_ident_muxstring ((uchar *)CONFIG_SYS_I2C_IVM_BUS);
@@ -313,6 +316,7 @@ int ivm_read_eeprom (void)
return -1;
}
i2c_set_bus_num (dev->busid);
+#endif
buf = (unsigned char *) getenv ("EEprom_ivm_addr");
if (buf != NULL)