In stead of defining the board EEPROM address in the board headers let's define them in the board config files and make them configurable by Kconfig.
Signed-off-by: Roger Quadros <rog...@ti.com> --- arch/arm/Kconfig | 10 ++++++++++ configs/am57xx_evm_defconfig | 2 ++ configs/am57xx_evm_nodt_defconfig | 2 ++ configs/am57xx_hs_evm_defconfig | 2 ++ configs/dra7xx_evm_defconfig | 2 ++ configs/dra7xx_hs_evm_defconfig | 2 ++ include/configs/am57xx_evm.h | 4 ---- include/configs/dra7xx_evm.h | 4 ---- 8 files changed, 20 insertions(+), 8 deletions(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c04adfb..19886ad 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1009,6 +1009,16 @@ config TARGET_THUNDERX_88XX endchoice +config EEPROM_BUS_ADDRESS + int "Board EEPROM's I2C bus address" + range 0 8 + default 0 + +config EEPROM_CHIP_ADDRESS + hex "Board EEPROM's I2C chip address" + range 0 0xff + default 0x50 + source "arch/arm/mach-at91/Kconfig" source "arch/arm/mach-bcm283x/Kconfig" diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig index 656d991..3b3e74a 100644 --- a/configs/am57xx_evm_defconfig +++ b/configs/am57xx_evm_defconfig @@ -2,6 +2,8 @@ CONFIG_ARM=y CONFIG_OMAP54XX=y # CONFIG_SPL_NAND_SUPPORT is not set CONFIG_TARGET_AM57XX_EVM=y +CONFIG_EEPROM_BUS_ADDRESS=0 +CONFIG_EEPROM_CHIP_ADDRESS=0x50 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_ARMV7_LPAE=y diff --git a/configs/am57xx_evm_nodt_defconfig b/configs/am57xx_evm_nodt_defconfig index b3b95f9..8d722e7 100644 --- a/configs/am57xx_evm_nodt_defconfig +++ b/configs/am57xx_evm_nodt_defconfig @@ -2,6 +2,8 @@ CONFIG_ARM=y CONFIG_OMAP54XX=y # CONFIG_SPL_NAND_SUPPORT is not set CONFIG_TARGET_AM57XX_EVM=y +CONFIG_EEPROM_BUS_ADDRESS=0 +CONFIG_EEPROM_CHIP_ADDRESS=0x50 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_SYS_CONSOLE_INFO_QUIET=y diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig index d920d68..36c8004 100644 --- a/configs/am57xx_hs_evm_defconfig +++ b/configs/am57xx_hs_evm_defconfig @@ -3,6 +3,8 @@ CONFIG_OMAP54XX=y CONFIG_TI_SECURE_DEVICE=y # CONFIG_SPL_NAND_SUPPORT is not set CONFIG_TARGET_AM57XX_EVM=y +CONFIG_EEPROM_BUS_ADDRESS=0 +CONFIG_EEPROM_CHIP_ADDRESS=0x50 CONFIG_TI_SECURE_EMIF_REGION_START=0xbe000000 CONFIG_TI_SECURE_EMIF_TOTAL_REGION_SIZE=0x02000000 CONFIG_TI_SECURE_EMIF_PROTECTED_REGION_SIZE=0x01c00000 diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig index 1836021..3108c58 100644 --- a/configs/dra7xx_evm_defconfig +++ b/configs/dra7xx_evm_defconfig @@ -2,6 +2,8 @@ CONFIG_ARM=y CONFIG_OMAP54XX=y # CONFIG_SPL_NAND_SUPPORT is not set CONFIG_TARGET_DRA7XX_EVM=y +CONFIG_EEPROM_BUS_ADDRESS=0 +CONFIG_EEPROM_CHIP_ADDRESS=0x50 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI_SUPPORT=y CONFIG_ARMV7_LPAE=y diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig index 1d107e4..7f5ce49 100644 --- a/configs/dra7xx_hs_evm_defconfig +++ b/configs/dra7xx_hs_evm_defconfig @@ -4,6 +4,8 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TI_SECURE_DEVICE=y # CONFIG_SPL_NAND_SUPPORT is not set CONFIG_TARGET_DRA7XX_EVM=y +CONFIG_EEPROM_BUS_ADDRESS=0 +CONFIG_EEPROM_CHIP_ADDRESS=0x50 CONFIG_TI_SECURE_EMIF_REGION_START=0xbe000000 CONFIG_TI_SECURE_EMIF_TOTAL_REGION_SIZE=0x02000000 CONFIG_TI_SECURE_EMIF_PROTECTED_REGION_SIZE=0x01c00000 diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 840502c..d9e1119 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -105,10 +105,6 @@ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN) -/* EEPROM */ -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 -#define CONFIG_EEPROM_BUS_ADDRESS 0 - /* * Default to using SPI for environment, etc. * 0x000000 - 0x040000 : QSPI.SPL (256KiB) diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index da458a4..46beb8b 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -264,8 +264,4 @@ #endif #endif /* NOR support */ -/* EEPROM */ -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 -#define CONFIG_EEPROM_BUS_ADDRESS 0 - #endif /* __CONFIG_DRA7XX_EVM_H */ -- 2.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot