summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/mx7
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-07-13 07:25:39 (GMT)
committerStefano Babic <sbabic@denx.de>2016-07-19 17:52:14 (GMT)
commitec7fde3ebfeb1dc428206bf1afca87dbd86cc29b (patch)
treedec6444af2cf88b3396c06c9e24cfa8a1ec1b8df /arch/arm/cpu/armv7/mx7
parentc4483093f38f20c4122bd27456bffdda518e4d71 (diff)
downloadu-boot-ec7fde3ebfeb1dc428206bf1afca87dbd86cc29b.tar.xz
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 <stefan.agner@toradex.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm/cpu/armv7/mx7')
-rw-r--r--arch/arm/cpu/armv7/mx7/soc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c
index ef46c92..dead1d3 100644
--- a/arch/arm/cpu/armv7/mx7/soc.c
+++ b/arch/arm/cpu/armv7/mx7/soc.c
@@ -248,6 +248,20 @@ int arch_cpu_init(void)
return 0;
}
+#ifdef CONFIG_ARCH_MISC_INIT
+int arch_misc_init(void)
+{
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+ if (is_mx7d())
+ setenv("soc", "imx7d");
+ else
+ setenv("soc", "imx7s");
+#endif
+
+ return 0;
+}
+#endif
+
#ifdef CONFIG_SERIAL_TAG
void get_board_serial(struct tag_serialnr *serialnr)
{