Commit 2973b098baf6fcb49d9fb7a2ed187e6a65532175
Committed by
Tom Rini
1 parent
f32b3d3fce
Exists in
v2017.01-smarct4x
and in
37 other branches
82xx/km82xx: 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 2 changed files with 11 additions and 1 deletions Side-by-side Diff
board/keymile/km82xx/km82xx.c
... | ... | @@ -18,6 +18,8 @@ |
18 | 18 | #include <i2c.h> |
19 | 19 | #include "../common/common.h" |
20 | 20 | |
21 | +static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN]; | |
22 | + | |
21 | 23 | /* |
22 | 24 | * I/O Port configuration table |
23 | 25 | * |
24 | 26 | |
... | ... | @@ -393,9 +395,15 @@ |
393 | 395 | return 0; |
394 | 396 | } |
395 | 397 | |
398 | +int misc_init_r(void) | |
399 | +{ | |
400 | + ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN); | |
401 | + return 0; | |
402 | +} | |
403 | + | |
396 | 404 | int hush_init_var(void) |
397 | 405 | { |
398 | - ivm_read_eeprom(); | |
406 | + ivm_analyze_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN); | |
399 | 407 | return 0; |
400 | 408 | } |
401 | 409 |
include/configs/km82xx.h