[U-Boot] [PATCH 4/9] mx7: set soc environment according to exact SoC type
Stefan Agner
stefan at agner.ch
Sun Jul 3 21:33:49 CEST 2016
From: Stefan Agner <stefan.agner at toradex.com>
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 at toradex.com>
---
arch/arm/cpu/armv7/mx7/soc.c | 12 ++++++++++++
include/configs/mx7_common.h | 2 ++
2 files changed, 14 insertions(+)
diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c
index ef46c92..a241476 100644
--- a/arch/arm/cpu/armv7/mx7/soc.c
+++ b/arch/arm/cpu/armv7/mx7/soc.c
@@ -248,6 +248,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_SERIAL_TAG
void get_board_serial(struct tag_serialnr *serialnr)
{
diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h
index fbc6de6..bc2833c 100644
--- a/include/configs/mx7_common.h
+++ b/include/configs/mx7_common.h
@@ -28,6 +28,8 @@
/* Enable iomux-lpsr support */
#define CONFIG_IOMUX_LPSR
+#define CONFIG_ARCH_MISC_INIT
+
#define CONFIG_DISPLAY_CPUINFO
#define CONFIG_DISPLAY_BOARDINFO
--
2.9.0
More information about the U-Boot
mailing list