diff options
author | Tom Rini <trini@ti.com> | 2012-07-31 09:37:08 -0700 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-09-01 14:58:13 +0200 |
commit | 726c05d2cfc0f0062cc7a32c0e06ab775b43c04c (patch) | |
tree | fc1a10e5a07518ddbc54f371a001175ce13aef3e /arch/arm/cpu | |
parent | 65d750be590db1ad3f045f45a8fbac59c4ccb9b5 (diff) | |
download | u-boot-imx-726c05d2cfc0f0062cc7a32c0e06ab775b43c04c.zip u-boot-imx-726c05d2cfc0f0062cc7a32c0e06ab775b43c04c.tar.gz u-boot-imx-726c05d2cfc0f0062cc7a32c0e06ab775b43c04c.tar.bz2 |
am33xx evm: Add CONFIG_CMD_EEPROM and related
am33xx boards have at least one eeprom and in the case of beaglebones
with capes, more.
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/armv7/am33xx/board.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c index a1fe104..0f16021 100644 --- a/arch/arm/cpu/armv7/am33xx/board.c +++ b/arch/arm/cpu/armv7/am33xx/board.c @@ -58,11 +58,6 @@ const struct gpio_bank *const omap_gpio_bank = gpio_bank_am33xx; static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; -/* - * I2C Address of on-board EEPROM - */ -#define I2C_BASE_BOARD_ADDR 0x50 - #define NO_OF_MAC_ADDR 3 #define ETH_ALEN 6 #define NAME_LEN 8 @@ -94,14 +89,14 @@ static inline int board_is_evm_sk(void) static int read_eeprom(void) { /* Check if baseboard eeprom is available */ - if (i2c_probe(I2C_BASE_BOARD_ADDR)) { + if (i2c_probe(CONFIG_SYS_I2C_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(I2C_BASE_BOARD_ADDR, 0, 2, (uchar *)&header, + if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 2, (uchar *)&header, sizeof(header))) { puts("Could not read the EEPROM; something fundamentally" " wrong on the I2C bus.\n"); @@ -113,8 +108,8 @@ static int read_eeprom(void) * read the eeprom using i2c again, * but use only a 1 byte address */ - if (i2c_read(I2C_BASE_BOARD_ADDR, 0, 1, (uchar *)&header, - sizeof(header))) { + if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0, 1, + (uchar *)&header, sizeof(header))) { puts("Could not read the EEPROM; something " "fundamentally wrong on the I2C bus.\n"); return -EIO; |