summaryrefslogtreecommitdiff
path: root/board/keymile
diff options
context:
space:
mode:
authorValentin Longchamp <valentin.longchamp@keymile.com>2015-02-10 17:10:14 +0100
committerTom Rini <trini@ti.com>2015-02-16 15:48:35 -0500
commit0bb95a68fc92bce3cc044ae3c006f6e33431617d (patch)
treee028011c47a7f3f746dfef2940354c819491839e /board/keymile
parent16ac90c7ee6fe973ee86fa9b08f876e5c33751bc (diff)
downloadu-boot-imx-0bb95a68fc92bce3cc044ae3c006f6e33431617d.zip
u-boot-imx-0bb95a68fc92bce3cc044ae3c006f6e33431617d.tar.gz
u-boot-imx-0bb95a68fc92bce3cc044ae3c006f6e33431617d.tar.bz2
kirkwood/km_arm: 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/km_arm/km_arm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index 1c7c108..6eb6712 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -102,6 +102,8 @@ static const u32 kwmpp_config[] = {
0
};
+static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
+
#if defined(CONFIG_KM_MGCOGE3UN)
/*
* Wait for startup OK from mgcoge3ne
@@ -210,6 +212,8 @@ int misc_init_r(void)
}
#endif
+ ivm_simple_read_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
+
initialize_unit_leds();
set_km_env();
set_bootcount_addr();
@@ -419,7 +423,7 @@ void reset_phy(void)
#if defined(CONFIG_HUSH_INIT_VAR)
int hush_init_var(void)
{
- ivm_read_eeprom();
+ ivm_analyze_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
return 0;
}
#endif