summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Longchamp <valentin.longchamp@keymile.com>2015-02-10 17:10:16 +0100
committerTom Rini <trini@ti.com>2015-02-16 15:48:35 -0500
commitf32b3d3fcec10dfc6a6848f8cc6a9eab9407aabf (patch)
tree3f91eebbbb3fe149bd0f20142fca7a4b046f24ac
parent0fdb6eadff19da604ea8907140421ec07b8bcc19 (diff)
downloadu-boot-imx-f32b3d3fcec10dfc6a6848f8cc6a9eab9407aabf.zip
u-boot-imx-f32b3d3fcec10dfc6a6848f8cc6a9eab9407aabf.tar.gz
u-boot-imx-f32b3d3fcec10dfc6a6848f8cc6a9eab9407aabf.tar.bz2
83xx/km83xx: read the IVM eeprom earlier
This allows to define the ethaddr env variable according to the the IVM content by reading the IVM in misc_init_r. Later, when HUSH is available the content read earlier is analyzed to populate some non env variables. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
-rw-r--r--board/keymile/km83xx/km83xx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index 1da0dcb..fc68a2f 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -28,6 +28,8 @@
#include "../common/common.h"
+static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
+
const qe_iop_conf_t qe_iop_conf_tab[] = {
/* port pin dir open_drain assign */
#if defined(CONFIG_MPC8360)
@@ -190,6 +192,7 @@ int board_early_init_r(void)
int misc_init_r(void)
{
+ ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
return 0;
}
@@ -370,7 +373,7 @@ int ft_board_setup(void *blob, bd_t *bd)
#if defined(CONFIG_HUSH_INIT_VAR)
int hush_init_var(void)
{
- ivm_read_eeprom();
+ ivm_analyze_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
return 0;
}
#endif