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>
diff --git a/board/atmel/common/board.c b/board/atmel/common/board.c
index 8f9b5e1..fc300a4 100644
--- a/board/atmel/common/board.c
+++ b/board/atmel/common/board.c
@@ -13,6 +13,8 @@
#define AT91_PDA_EEPROM_ID_LENGTH 5
#define AT91_PDA_EEPROM_DEFAULT_BUS 0
+char *get_cpu_name(void);
+
void dummy(void)
{
}
@@ -66,3 +68,8 @@
{
}
#endif
+
+void at91_prepare_cpu_var(void)
+{
+ env_set("cpu", get_cpu_name());
+}