summaryrefslogtreecommitdiff
path: root/board/keymile
diff options
context:
space:
mode:
authorValentin Longchamp <valentin.longchamp@keymile.com>2015-02-10 17:10:15 +0100
committerTom Rini <trini@ti.com>2015-02-16 15:48:35 -0500
commit0fdb6eadff19da604ea8907140421ec07b8bcc19 (patch)
treeac8fa23eeb936c47e1f283bb86d2d6d7f0df1101 /board/keymile
parent0bb95a68fc92bce3cc044ae3c006f6e33431617d (diff)
85xx/kmp204x: 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>
Diffstat (limited to 'board/keymile')
-rw-r--r--board/keymile/kmp204x/kmp204x.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c
index a74f75bad41..0f544fb979e 100644
--- a/board/keymile/kmp204x/kmp204x.c
+++ b/board/keymile/kmp204x/kmp204x.c
@@ -26,6 +26,8 @@
DECLARE_GLOBAL_DATA_PTR;
+static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
+
int checkboard(void)
{
printf("Board: Keymile %s\n", CONFIG_KM_BOARD_NAME);
@@ -195,13 +197,14 @@ int misc_init_r(void)
}
}
+ ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
return 0;
}
#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