summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-13 03:09:49 (GMT)
committerHeiko Schocher <hs@denx.de>2017-05-15 04:17:09 (GMT)
commiteb5ba3aefdf0f6cbd61684eeb61428f11fa7613c (patch)
tree89887dacbe56dc1b3cef048ce08c2ec3ef8f955b /include/common.h
parent22f3368e71321db1e0e15dfbf54b052367890ec7 (diff)
downloadu-boot-fsl-qoriq-eb5ba3aefdf0f6cbd61684eeb61428f11fa7613c.tar.xz
i2c: Drop use of CONFIG_I2C_HARD
This option is pretty old. It predates CONFIG_SYS_I2C which is itself deprecated in favour of driver model. Disable it for all boards. Also drop I2C options which depend on this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 83e4037..45f190a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -499,9 +499,19 @@ void reset_phy (void);
void fdc_hw_init (void);
/* $(BOARD)/eeprom.c */
+#ifdef CONFIG_CMD_EEPROM
void eeprom_init (int bus);
int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt);
int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt);
+#else
+/*
+ * Some EEPROM code is depecated because it used the legacy I2C interface. Add
+ * some macros here so we don't have to touch every one of those uses
+ */
+#define eeprom_init(bus)
+#define eeprom_read(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
+#define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS)
+#endif
/*
* Set this up regardless of board