aboutsummaryrefslogtreecommitdiff
path: root/board/atmel/common
diff options
context:
space:
mode:
authorEugen Hristev2018-10-08 09:54:27 +0300
committerTom Rini2018-10-22 09:18:49 -0400
commit61b4dbb0d0c6dcb5a008e84e07a54e5b500a8b4b (patch)
tree09f2a73504f369493002a639682f6e1e93cb3ead /board/atmel/common
parent6482095de6d0a21e150fbce86ba351ce225afe03 (diff)
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>
Diffstat (limited to 'board/atmel/common')
-rw-r--r--board/atmel/common/board.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/atmel/common/board.c b/board/atmel/common/board.c
index 8f9b5e137c4..fc300a4210b 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 @@ void at91_pda_detect(void)
{
}
#endif
+
+void at91_prepare_cpu_var(void)
+{
+ env_set("cpu", get_cpu_name());
+}