Commit 0fdb6eadff19da604ea8907140421ec07b8bcc19
Committed by
Tom Rini
1 parent
0bb95a68fc
Exists in
v2017.01-smarct4x
and in
37 other branches
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>
Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff
board/keymile/kmp204x/kmp204x.c
... | ... | @@ -26,6 +26,8 @@ |
26 | 26 | |
27 | 27 | DECLARE_GLOBAL_DATA_PTR; |
28 | 28 | |
29 | +static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN]; | |
30 | + | |
29 | 31 | int checkboard(void) |
30 | 32 | { |
31 | 33 | printf("Board: Keymile %s\n", CONFIG_KM_BOARD_NAME); |
32 | 34 | |
... | ... | @@ -195,13 +197,14 @@ |
195 | 197 | } |
196 | 198 | } |
197 | 199 | |
200 | + ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN); | |
198 | 201 | return 0; |
199 | 202 | } |
200 | 203 | |
201 | 204 | #if defined(CONFIG_HUSH_INIT_VAR) |
202 | 205 | int hush_init_var(void) |
203 | 206 | { |
204 | - ivm_read_eeprom(); | |
207 | + ivm_analyze_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN); | |
205 | 208 | return 0; |
206 | 209 | } |
207 | 210 | #endif |