OMAP3: TAM3517: add macros for reading eeprom

Added macros to read SOM information from the I2C
EEPROM.

Signed-off-by: Stefano Babic <sbabic@denx.de>
This commit is contained in:
Stefano Babic
2012-11-23 05:19:25 +00:00
committed by Tom Rini
parent fe2d59a123
commit 31f5b651fa
3 changed files with 60 additions and 23 deletions

View File

@@ -258,21 +258,26 @@ int board_init(void)
return 0;
}
#ifndef CONFIG_SPL_BUILD
int misc_init_r(void)
{
char *eth_addr;
struct tam3517_module_info info;
int ret;
TAM3517_READ_EEPROM(&info, ret);
dieid_num_r();
eth_addr = getenv("ethaddr");
if (eth_addr)
if (ret)
return 0;
eth_addr = getenv("ethaddr");
if (!eth_addr)
TAM3517_READ_MAC_FROM_EEPROM(&info);
#ifndef CONFIG_SPL_BUILD
TAM3517_READ_MAC_FROM_EEPROM;
#endif
TAM3517_PRINT_SOM_INFO(&info);
return 0;
}
#endif
/*
* Routine: set_muxconf_regs