All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH] i2c/eeprom: Always define I2C_RXTX_LEN
@ 2016-04-20  8:44 Mario Six
  0 siblings, 0 replies; only message in thread
From: Mario Six @ 2016-04-20  8:44 UTC (permalink / raw)
  To: u-boot

From: Mario Six <six@gdsys.de>

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 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cmd/eeprom.c b/cmd/eeprom.c
index 571240a..e5457ba 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))

--
2.7.0.GIT

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-20  8:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20  8:44 [U-Boot] [RFC PATCH] i2c/eeprom: Always define I2C_RXTX_LEN Mario Six

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.