]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: Use Kconfig for board EEPROM's I2C bus and chip address
authorRoger Quadros <rogerq@ti.com>
Mon, 13 Mar 2017 13:04:31 +0000 (15:04 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 20 Mar 2017 21:57:15 +0000 (17:57 -0400)
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 <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
board/ti/common/Kconfig
board/ti/ks2_evm/Kconfig
include/configs/am57xx_evm.h
include/configs/dra7xx_evm.h

index adf73abc9358561941f69a850b215920bec88b90..15b5ccf741b627e273e2b3f8372e5bbf309465e1 100644 (file)
@@ -3,3 +3,13 @@ config TI_I2C_BOARD_DETECT
        help
           Support for detection board information on Texas Instrument's
           Evaluation Boards which have I2C based EEPROM detection
+
+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
index c0568ec50c5a2a416e4ddf8520aa926b481fb412..9477f5336b8d871d91e8fe5583328b046c72a9d5 100644 (file)
@@ -49,3 +49,5 @@ config SYS_CONFIG_NAME
        default "k2g_evm"
 
 endif
+
+source "board/ti/common/Kconfig"
index d545e1b6a567171b1357c03fdae4051ef2f520ed..018d0c772138a183eadaa692cc63bab69e6c0bda 100644 (file)
 #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)
index 43e74a29e9110197bda78c6238b0ce4c9f3484df..d509afd2ea57fe891452fc27025dbd17dbf4b00d 100644 (file)
 #endif
 #endif  /* NOR support */
 
-/* EEPROM */
-#define CONFIG_EEPROM_CHIP_ADDRESS 0x50
-#define CONFIG_EEPROM_BUS_ADDRESS 0
-
 #endif /* __CONFIG_DRA7XX_EVM_H */