summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Six <six@gdsys.de>2016-04-20 10:44:52 +0200
committerHeiko Schocher <hs@denx.de>2016-05-03 15:25:46 +0200
commita6e7b7744e158c4c02f91fcbf991845cad4dc6e3 (patch)
treedc5c2db87503eb2725882367c354a3be0da66154
parent58abb988ce24525474f0d515d2a36c1b3acf893f (diff)
downloadtalos-obmc-uboot-a6e7b7744e158c4c02f91fcbf991845cad4dc6e3.tar.gz
talos-obmc-uboot-a6e7b7744e158c4c02f91fcbf991845cad4dc6e3.zip
i2c/eeprom: Always define I2C_RXTX_LEN
I2C_RXTX_LEN from include/i2c.h is not defined if CONFIG_DM_I2C is enabled. This leads to a compilation error on boards that enable both CONFIG_CMD_EEPROM and CONFIG_DM_I2C. To avoid this, we define I2C_RXTX_LEN in cmd/eeprom.c if it is not already defined. Signed-off-by: Mario Six <mario.six@gdsys.cc>
-rw-r--r--cmd/eeprom.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index 571240a99b..e5457ba0cf 100644
--- a/cmd/eeprom.c
+++ b/cmd/eeprom.c
@@ -37,6 +37,10 @@
#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 8
#endif
+#ifndef I2C_RXTX_LEN
+#define I2C_RXTX_LEN 128
+#endif
+
#define EEPROM_PAGE_SIZE (1 << CONFIG_SYS_EEPROM_PAGE_WRITE_BITS)
#define EEPROM_PAGE_OFFSET(x) ((x) & (EEPROM_PAGE_SIZE - 1))
OpenPOWER on IntegriCloud