mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
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>
This commit is contained in:
parent
f32b3d3fce
commit
2973b098ba
2 changed files with 11 additions and 1 deletions
|
@ -18,6 +18,8 @@
|
||||||
#include <i2c.h>
|
#include <i2c.h>
|
||||||
#include "../common/common.h"
|
#include "../common/common.h"
|
||||||
|
|
||||||
|
static uchar ivm_content[CONFIG_SYS_IVM_EEPROM_MAX_LEN];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* I/O Port configuration table
|
* I/O Port configuration table
|
||||||
*
|
*
|
||||||
|
@ -393,9 +395,15 @@ int board_early_init_r(void)
|
||||||
return 0;
|
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)
|
int hush_init_var(void)
|
||||||
{
|
{
|
||||||
ivm_read_eeprom();
|
ivm_analyze_eeprom(ivm_content, CONFIG_SYS_IVM_EEPROM_MAX_LEN);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
|
|
||||||
#define CONFIG_SYS_TEXT_BASE 0xFE000000
|
#define CONFIG_SYS_TEXT_BASE 0xFE000000
|
||||||
|
|
||||||
|
#define CONFIG_MISC_INIT_R
|
||||||
|
|
||||||
/* include common defines/options for all Keymile boards */
|
/* include common defines/options for all Keymile boards */
|
||||||
#include "km/keymile-common.h"
|
#include "km/keymile-common.h"
|
||||||
#include "km/km-powerpc.h"
|
#include "km/km-powerpc.h"
|
||||||
|
|
Loading…
Add table
Reference in a new issue