Skip to content
Snippets Groups Projects
Commit 0fdb6ead authored by Valentin Longchamp's avatar Valentin Longchamp Committed by Tom Rini
Browse files

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: default avatarValentin Longchamp <valentin.longchamp@keymile.com>
parent 0bb95a68
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
int checkboard(void) int checkboard(void)
{ {
printf("Board: Keymile %s\n", CONFIG_KM_BOARD_NAME); printf("Board: Keymile %s\n", CONFIG_KM_BOARD_NAME);
...@@ -195,13 +197,14 @@ int misc_init_r(void) ...@@ -195,13 +197,14 @@ int misc_init_r(void)
} }
} }
ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
return 0; return 0;
} }
#if defined(CONFIG_HUSH_INIT_VAR) #if defined(CONFIG_HUSH_INIT_VAR)
int hush_init_var(void) int hush_init_var(void)
{ {
ivm_read_eeprom(); ivm_analyze_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
return 0; return 0;
} }
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment