diff options
author | Heiko Schocher <hs@denx.de> | 2012-10-25 10:32:14 +0200 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2013-07-23 08:34:53 +0200 |
commit | 9a2accb44f871af9c87c34d1c9ac95010f4e6f09 (patch) | |
tree | f4fdbb502b7cd8572f848e20db5321bc2f07d30d /common/env_eeprom.c | |
parent | 00f792e0df9ae942427e44595a0f4379582accee (diff) | |
download | u-boot-9a2accb44f871af9c87c34d1c9ac95010f4e6f09.tar.gz |
i2c, multibus: get rid of CONFIG_I2C_MUX
CONFIG_I2C_MUX is replaced through the new i2c multibus/multiadapter
framework, configured through CONFIG_SYS_I2C. As CONFIG_I2C_MUX
is only used on the keymile boards, and they are now completely
moved to the new framework, remove CONFIG_I2C_MUX.
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Holger Brunck <holger.brunck@keymile.com>
Tested-By: Holger Brunck <holger.brunck@keymile.com>
Diffstat (limited to 'common/env_eeprom.c')
-rw-r--r-- | common/env_eeprom.c | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/common/env_eeprom.c b/common/env_eeprom.c index fbd459ac20..21226bf329 100644 --- a/common/env_eeprom.c +++ b/common/env_eeprom.c @@ -49,41 +49,17 @@ static int eeprom_bus_read(unsigned dev_addr, unsigned offset, #if defined(CONFIG_I2C_ENV_EEPROM_BUS) int old_bus = i2c_get_bus_num(); -#if defined(CONFIG_SYS_I2C) if (old_bus != CONFIG_I2C_ENV_EEPROM_BUS) i2c_set_bus_num(CONFIG_I2C_ENV_EEPROM_BUS); -#else - if (gd->flags & GD_FLG_RELOC) { - if (env_eeprom_bus == -1) { - I2C_MUX_DEVICE *dev = NULL; - dev = i2c_mux_ident_muxstring( - (uchar *)CONFIG_I2C_ENV_EEPROM_BUS); - if (dev != NULL) - env_eeprom_bus = dev->busid; - else - printf("error adding env eeprom bus.\n"); - } - if (old_bus != env_eeprom_bus) { - i2c_set_bus_num(env_eeprom_bus); - old_bus = env_eeprom_bus; - } - } else { - rcode = i2c_mux_ident_muxstring_f( - (uchar *)CONFIG_I2C_ENV_EEPROM_BUS); - } -#endif #endif rcode = eeprom_read(dev_addr, offset, buffer, cnt); #if defined(CONFIG_I2C_ENV_EEPROM_BUS) -#if defined(CONFIG_SYS_I2C) - if (old_bus != CONFIG_I2C_ENV_EEPROM_BUS) -#else if (old_bus != env_eeprom_bus) -#endif i2c_set_bus_num(old_bus); #endif + return rcode; } @@ -94,14 +70,12 @@ static int eeprom_bus_write(unsigned dev_addr, unsigned offset, #if defined(CONFIG_I2C_ENV_EEPROM_BUS) int old_bus = i2c_get_bus_num(); -#if defined(CONFIG_SYS_I2C) if (old_bus != CONFIG_I2C_ENV_EEPROM_BUS) i2c_set_bus_num(CONFIG_I2C_ENV_EEPROM_BUS); -#else - rcode = i2c_mux_ident_muxstring_f((uchar *)CONFIG_I2C_ENV_EEPROM_BUS); -#endif #endif + rcode = eeprom_write(dev_addr, offset, buffer, cnt); + #if defined(CONFIG_I2C_ENV_EEPROM_BUS) i2c_set_bus_num(old_bus); #endif |