Hello u-boot,

I'm defining a new board config and have some observations about eeprom 
configuration I hope someone could clarify for me.

There appear to be two conflicting config options:
CONFIG_I2C_ENV_EEPROM_BUS and CONFIG_SYS_I2C_EEPROM_BUS

What are the purpose of these two options?  Could we do without 
CONFIG_I2C_ENV_EEPROM_BUS and just use CONFIG_SYS_I2C_EEPROM_BUS?

An include for the TI SoC I am using defines CONFIG_SPI, when this is defined 
the following code sets CONFIG_SYS_DEF_EEPROM_ADDR to 0.  
CONFIG_SYS_DEF_EEPROM_ADDR is used in common/env_eeprom.c as the i2c address to 
read the environment from so with CONFIG_SPI set one can not use an eeprom for 
the u-boot environment.

include/common.h:475
#if defined(CONFIG_SPI) || !defined(CONFIG_SYS_I2C_EEPROM_ADDR)
# define CONFIG_SYS_DEF_EEPROM_ADDR 0
#else
#if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
# define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR
#endif
#endif /* CONFIG_SPI || !defined(CONFIG_SYS_I2C_EEPROM_ADDR) */

If I accidentally define CONFIG_ENV_EEPROM_IS_ON_I2C likewise, 
CONFIG_SYS_DEF_EEPROM_ADDR remains unset and the environment is not read.

It would seem logical to define that as my environment eeprom is indeed on an 
eeprom so I'm not sure why that config option exists.

Thanks,
Guy Thouret
Guy Thouret

Senior Software Engineer

t: 0161 4751777 Ext.244 |  m:  |  dd: |  f: 0161 4751778  |  w: 
www.wems.co.uk<http://www.wems.co.uk>  |  Follow WEMS on 
Linkedin<http://www.linkedin.com/company/2136271?trk=tyah>  |  Follow WEMS on 
Twitter<https://twitter.com/WEMSsavesenergy>

[https://portal.wems.co.uk/signature_image.png]
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to