diff options
author | Valentin Longchamp <valentin.longchamp@keymile.com> | 2015-02-10 17:10:17 +0100 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2015-02-16 15:48:35 -0500 |
commit | 2973b098baf6fcb49d9fb7a2ed187e6a65532175 (patch) | |
tree | 2bd73f451db7c188111350e43c2ba68613d217e1 /board/keymile | |
parent | f32b3d3fcec10dfc6a6848f8cc6a9eab9407aabf (diff) | |
download | u-boot-imx-2973b098baf6fcb49d9fb7a2ed187e6a65532175.zip u-boot-imx-2973b098baf6fcb49d9fb7a2ed187e6a65532175.tar.gz u-boot-imx-2973b098baf6fcb49d9fb7a2ed187e6a65532175.tar.bz2 |
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>
Diffstat (limited to 'board/keymile')
-rw-r--r-- | board/keymile/km82xx/km82xx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/board/keymile/km82xx/km82xx.c b/board/keymile/km82xx/km82xx.c index bf84676..c3a1131 100644 --- a/board/keymile/km82xx/km82xx.c +++ b/board/keymile/km82xx/km82xx.c @@ -18,6 +18,8 @@ #include <i2c.h> #include "../common/common.h" +static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN]; + /* * I/O Port configuration table * @@ -393,9 +395,15 @@ int board_early_init_r(void) return 0; } +int misc_init_r(void) +{ + ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN); + return 0; +} + int hush_init_var(void) { - ivm_read_eeprom(); + ivm_analyze_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN); return 0; } |