[PATCH 03/13] arm: shc: Change CONFIG_SYS_I2C_EEPROM_ADDR to EEPROM_ADDR
Tom Rini
trini at konsulko.com
Tue Aug 17 23:59:38 CEST 2021
The shc platforms do not make use of the rest of the EEPROM
infrastructure. Rather than make more elaborate Kconfig logic, remove
this setting from the CONFIG namespace.
Cc: Heiko Schocher <hs at denx.de>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
board/bosch/shc/board.c | 5 +++--
include/configs/am335x_shc.h | 1 -
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c
index 13fd25e40710..a7a9775fdf4e 100644
--- a/board/bosch/shc/board.c
+++ b/board/bosch/shc/board.c
@@ -51,16 +51,17 @@ static int shc_eeprom_valid;
/*
* Read header information from EEPROM into global structure.
*/
+#define EEPROM_ADDR 0x50
static int read_eeprom(void)
{
/* Check if baseboard eeprom is available */
- if (i2c_probe(CONFIG_SYS_I2C_EEPROM_ADDR)) {
+ if (i2c_probe(EEPROM_ADDR)) {
puts("Could not probe the EEPROM; something fundamentally wrong on the I2C bus.\n");
return -ENODEV;
}
/* read the eeprom using i2c */
- if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 2, (uchar *)&header,
+ if (i2c_read(EEPROM_ADDR, 0, 2, (uchar *)&header,
sizeof(header))) {
puts("Could not read the EEPROM; something fundamentally wrong on the I2C bus.\n");
return -EIO;
diff --git a/include/configs/am335x_shc.h b/include/configs/am335x_shc.h
index 387d50d51199..5b0eba9afa42 100644
--- a/include/configs/am335x_shc.h
+++ b/include/configs/am335x_shc.h
@@ -225,7 +225,6 @@
#define CONFIG_NET_RETRY_COUNT 10
/* I2C configuration */
-#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
#define CONFIG_SYS_I2C_SPEED 400000
#define CONFIG_SYS_I2C_SLAVE 1
--
2.17.1
More information about the U-Boot
mailing list