kp_imx53: Switch to using a local namespace for ID EEPROM
authorTom Rini <trini@konsulko.com>
Tue, 17 Aug 2021 21:59:36 +0000 (17:59 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 30 Aug 2021 18:10:05 +0000 (14:10 -0400)
This platform does not use any of the standard EEPROM functionality and
instead provides its own.  Use a local namespace for the I2C related
defines to access the EEPROM.

Cc: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
board/k+p/kp_imx53/kp_id_rev.c
include/configs/kp_imx53.h

index 7103a3e0f2b5b1c332f0d6bf38ae5b074dd62c9f..9f93cf008ce8542b84d7d933f1970694a28ed6b4 100644 (file)
@@ -64,6 +64,10 @@ void show_eeprom(void)
        eth_env_set_enetaddr("ethaddr", p);
 }
 
+#define I2C_EEPROM_BUS_NUM     1
+#define I2C_EEPROM_ADDR                0x50
+#define I2C_EEPROM_ADDR_LEN    2
+
 int read_eeprom(void)
 {
        struct udevice *dev;
@@ -72,9 +76,8 @@ int read_eeprom(void)
        if (eeprom_has_been_read)
                return 0;
 
-       ret = i2c_get_chip_for_busnum(CONFIG_SYS_EEPROM_BUS_NUM,
-                                     CONFIG_SYS_I2C_EEPROM_ADDR,
-                                     CONFIG_SYS_I2C_EEPROM_ADDR_LEN, &dev);
+       ret = i2c_get_chip_for_busnum(I2C_EEPROM_BUS_NUM, I2C_EEPROM_ADDR,
+                                     I2C_EEPROM_ADDR_LEN, &dev);
        if (ret) {
                printf("Cannot find EEPROM !\n");
                return ret;
index c94882846efa4c581e01c6c1b07e4dd460a24c82..87f4841af05cdd57bcaf921c0fbaf5fcd8f3abe5 100644 (file)
@@ -20,9 +20,6 @@
 #define CONFIG_MXC_USB_FLAGS   0
 
 #define CONFIG_SYS_I2C_MXC
-#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
-#define CONFIG_SYS_EEPROM_BUS_NUM 1
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
 
 /* Command definition */
 #define CONFIG_LOADADDR                0x72000000      /* loadaddr env var */