diff options
author | Marek Vasut <marex@denx.de> | 2015-11-10 20:53:31 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-11-21 21:50:26 -0500 |
commit | 354e3ed754fea744ff412b1e015b696db08320e3 (patch) | |
tree | b46abf0507aac3f67b8940660fd60cb2612bb828 /include/common.h | |
parent | 1a37889b0ad084a740b4f785031d7ae9955d947b (diff) |
eeprom: Add bus argument to eeprom_init()
Add bus argument to eeprom_init(), so that it can select
the I2C bus number on which the eeprom resides. Any negative
value of the $bus argument will preserve the old behavior.
This is in place so that old code does not randomly break.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
[trini: Wrap i2c_set_bus_num() call with CONFIG_SYS_I2C test]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/common.h')
-rw-r--r-- | include/common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/common.h b/include/common.h index cb35ac8aaa0..a3831b78dcc 100644 --- a/include/common.h +++ b/include/common.h @@ -474,7 +474,7 @@ void reset_phy (void); void fdc_hw_init (void); /* $(BOARD)/eeprom.c */ -void eeprom_init (void); +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); |