diff options
author | Stefano Babic <sbabic@denx.de> | 2012-11-23 05:19:25 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-12-10 08:56:38 -0700 |
commit | 31f5b651fad3d3999d8bd62f228d940bf1b42276 (patch) | |
tree | dd7effb6b0aff7c40cc35e4f21051e7cd74b2045 /board | |
parent | fe2d59a123321f142552212175d3dcb1da659d8c (diff) | |
download | u-boot-imx-31f5b651fad3d3999d8bd62f228d940bf1b42276.zip u-boot-imx-31f5b651fad3d3999d8bd62f228d940bf1b42276.tar.gz u-boot-imx-31f5b651fad3d3999d8bd62f228d940bf1b42276.tar.bz2 |
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>
Diffstat (limited to 'board')
-rw-r--r-- | board/technexion/twister/twister.c | 10 | ||||
-rw-r--r-- | board/teejet/mt_ventoux/mt_ventoux.c | 15 |
2 files changed, 17 insertions, 8 deletions
diff --git a/board/technexion/twister/twister.c b/board/technexion/twister/twister.c index 1471559..c9eea9b 100644 --- a/board/technexion/twister/twister.c +++ b/board/technexion/twister/twister.c @@ -98,9 +98,12 @@ 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; dieid_num_r(); @@ -108,12 +111,13 @@ int misc_init_r(void) if (eth_addr) return 0; -#ifndef CONFIG_SPL_BUILD - TAM3517_READ_MAC_FROM_EEPROM; -#endif + TAM3517_READ_EEPROM(&info, ret); + if (!ret) + TAM3517_READ_MAC_FROM_EEPROM(&info); return 0; } +#endif /* * Routine: set_muxconf_regs diff --git a/board/teejet/mt_ventoux/mt_ventoux.c b/board/teejet/mt_ventoux/mt_ventoux.c index 98b92f3..c516c75 100644 --- a/board/teejet/mt_ventoux/mt_ventoux.c +++ b/board/teejet/mt_ventoux/mt_ventoux.c @@ -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 |