Signed-off-by: Guillaume GARDET <guillaume.gar...@free.fr> Cc: Troy Kisky <troy.ki...@boundarydevices.com> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@nxp.com> Cc: Gary Bisson <gary.bis...@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 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot