From 354e3ed754fea744ff412b1e015b696db08320e3 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 10 Nov 2015 20:53:31 +0100 Subject: 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 Cc: Simon Glass Cc: Tom Rini Cc: Heiko Schocher Reviewed-by: Heiko Schocher [trini: Wrap i2c_set_bus_num() call with CONFIG_SYS_I2C test] Signed-off-by: Tom Rini --- include/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h index cb35ac8..a3831b7 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); -- cgit v1.1