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

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: default avatarValentin Longchamp <valentin.longchamp@keymile.com>
parent 0fdb6ead
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include "../common/common.h" #include "../common/common.h"
static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
const qe_iop_conf_t qe_iop_conf_tab[] = { const qe_iop_conf_t qe_iop_conf_tab[] = {
/* port pin dir open_drain assign */ /* port pin dir open_drain assign */
#if defined(CONFIG_MPC8360) #if defined(CONFIG_MPC8360)
...@@ -190,6 +192,7 @@ int board_early_init_r(void) ...@@ -190,6 +192,7 @@ int board_early_init_r(void)
int misc_init_r(void) int misc_init_r(void)
{ {
ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
return 0; return 0;
} }
...@@ -370,7 +373,7 @@ int ft_board_setup(void *blob, bd_t *bd) ...@@ -370,7 +373,7 @@ int ft_board_setup(void *blob, bd_t *bd)
#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