i2c/eeprom: Always define I2C_RXTX_LEN
authorMario Six <six@gdsys.de>
Wed, 20 Apr 2016 08:44:52 +0000 (10:44 +0200)
committerHeiko Schocher <hs@denx.de>
Tue, 3 May 2016 13:25:46 +0000 (15:25 +0200)
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>
cmd/eeprom.c

index 571240a99bc011da7b4cc9f05de32f2c82eb59a8..e5457ba0cf44d82344517a1b9b4fbaa1d1853f96 100644 (file)
 #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))