[U-Boot] [PATCH V3 1/3] imx6: Define 'soc' env var for imx6 SoC

Guillaume GARDET guillaume.gardet at free.fr
Wed Apr 11 10:38:48 UTC 2018


Signed-off-by: Guillaume GARDET <guillaume.gardet at free.fr>
Cc: Troy Kisky <troy.kisky at boundarydevices.com>
Cc: Stefano Babic <sbabic at denx.de>
Cc: Fabio Estevam <fabio.estevam at nxp.com>
Cc: Gary Bisson <gary.bisson at boundarydevices.com>

---
 arch/arm/mach-imx/mx6/soc.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c
index 9b3d8f69b2..c4cb752c76 100644
--- a/arch/arm/mach-imx/mx6/soc.c
+++ b/arch/arm/mach-imx/mx6/soc.c
@@ -446,6 +446,40 @@ int arch_cpu_init(void)
 	return 0;
 }
 
+ #ifdef CONFIG_ARCH_MISC_INIT
+ int arch_misc_init(void)
+ {
+ #ifdef CONFIG_ENV_VARS_UBOOT_CONFIG
+	if (is_cpu_type(MXC_CPU_MX6QP))
+		env_set("soc", "imx6qp");
+	else if (is_cpu_type(MXC_CPU_MX6Q))
+		env_set("soc", "imx6q");
+	else if (is_cpu_type(MXC_CPU_MX6DP))
+		env_set("soc", "imx6dp");
+	else if (is_cpu_type(MXC_CPU_MX6D))
+		env_set("soc", "imx6d");
+	else if (is_mx6dl( ))
+		env_set("soc", "imx6dl");
+	else if (is_mx6sx( ))
+		env_set("soc", "imx6sx");
+	else if (is_mx6sl( ))
+		env_set("soc", "imx6sl");
+	else if (is_mx6solo( ))
+		env_set("soc", "imx6solo");
+	else if (is_mx6ul( ))
+		env_set("soc", "imx6ul");
+	else if (is_mx6ull( ))
+		env_set("soc", "imx6ull");
+	else if (is_mx6sll( ))
+		env_set("soc", "imx6sll");
+	else
+		env_set("soc", "imx6");
+ #endif
+
+	return 0;
+ }
+ #endif
+
 #ifdef CONFIG_ENV_IS_IN_MMC
 __weak int board_mmc_get_env_dev(int devno)
 {
-- 
2.13.6



More information about the U-Boot mailing list