Commit f32b3d3fcec10dfc6a6848f8cc6a9eab9407aabf

Authored by Valentin Longchamp
Committed by Tom Rini
1 parent 0fdb6eadff

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>

Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff

board/keymile/km83xx/km83xx.c
... ... @@ -28,6 +28,8 @@
28 28  
29 29 #include "../common/common.h"
30 30  
  31 +static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
  32 +
31 33 const qe_iop_conf_t qe_iop_conf_tab[] = {
32 34 /* port pin dir open_drain assign */
33 35 #if defined(CONFIG_MPC8360)
... ... @@ -190,6 +192,7 @@
190 192  
191 193 int misc_init_r(void)
192 194 {
  195 + ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
193 196 return 0;
194 197 }
195 198  
... ... @@ -370,7 +373,7 @@
370 373 #if defined(CONFIG_HUSH_INIT_VAR)
371 374 int hush_init_var(void)
372 375 {
373   - ivm_read_eeprom();
  376 + ivm_analyze_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
374 377 return 0;
375 378 }
376 379 #endif