From 651ceaea01475e87b7264ab3844ce746725cb538 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 3 Jun 2016 18:40:35 -0700 Subject: mx7: set soc environment according to exact SoC type This can be useful if the same U-Boot binary is used for boards available with a i.MX 7Solo and i.MX 7Dual. Signed-off-by: Stefan Agner Acked-by: Max Krummenacher --- arch/arm/cpu/armv7/mx7/soc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c index 18261ad49d..ad0aa68197 100644 --- a/arch/arm/cpu/armv7/mx7/soc.c +++ b/arch/arm/cpu/armv7/mx7/soc.c @@ -259,6 +259,18 @@ int arch_cpu_init(void) return 0; } +#ifdef CONFIG_ARCH_MISC_INIT +int arch_misc_init(void) +{ + if (is_mx7d()) + setenv("soc", "imx7d"); + else + setenv("soc", "imx7s"); + + return 0; +} +#endif + #ifdef CONFIG_BOARD_POSTCLK_INIT int board_postclk_init(void) { -- cgit v1.2.3