board: at91sam9x5: add environment var for cpu type
When booting and CPU is detected from cpuid, we also need an environment variable that will be used in boot commands to load the proper devicetree. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
This commit is contained in:
parent
6482095de6
commit
61b4dbb0d0
@ -20,6 +20,9 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||||||
/*
|
/*
|
||||||
* Miscelaneous platform dependent initialisations
|
* Miscelaneous platform dependent initialisations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void at91_prepare_cpu_var(void);
|
||||||
|
|
||||||
#ifdef CONFIG_CMD_NAND
|
#ifdef CONFIG_CMD_NAND
|
||||||
static void at91sam9x5ek_nand_hw_init(void)
|
static void at91sam9x5ek_nand_hw_init(void)
|
||||||
{
|
{
|
||||||
@ -85,6 +88,7 @@ int board_late_init(void)
|
|||||||
#ifdef CONFIG_DM_VIDEO
|
#ifdef CONFIG_DM_VIDEO
|
||||||
at91_video_show_board_info();
|
at91_video_show_board_info();
|
||||||
#endif
|
#endif
|
||||||
|
at91_prepare_cpu_var();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
#define AT91_PDA_EEPROM_ID_LENGTH 5
|
#define AT91_PDA_EEPROM_ID_LENGTH 5
|
||||||
#define AT91_PDA_EEPROM_DEFAULT_BUS 0
|
#define AT91_PDA_EEPROM_DEFAULT_BUS 0
|
||||||
|
|
||||||
|
char *get_cpu_name(void);
|
||||||
|
|
||||||
void dummy(void)
|
void dummy(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -66,3 +68,8 @@ void at91_pda_detect(void)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void at91_prepare_cpu_var(void)
|
||||||
|
{
|
||||||
|
env_set("cpu", get_cpu_name());
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user