On 2016-07-04 05:27, Fabio Estevam wrote: > Hi Stefan, > > On Sun, Jul 3, 2016 at 4:33 PM, Stefan Agner <ste...@agner.ch> wrote: > >> +#ifdef CONFIG_ARCH_MISC_INIT >> +int arch_misc_init(void) >> +{ >> + if (is_mx7d()) >> + setenv("soc", "imx7d"); >> + else >> + setenv("soc", "imx7s"); >> + >> + return 0; >> +} >> +#endif > > For SoC detection type in run-time we usually use "ifdef > CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG". > > Take a look at udoo, wandboard, mx6cubox, mx6sabresd.c for reference. > > It would be nice to keep it consistent here too.
Sounds sensible. Would be the first use of CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG in arch/arm/, but I guess that is fine. Note that CONFIG_SYS_SOC, which defines the environment variable "soc", is currently defined "mx7" by default... What do you think, do we want CONFIG_ARCH_MISC_INIT/CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG set for i.MX 7 Sabre/Warp7? Put it in Common directly? Afaik those boards only exist in a single variant, hence they always will load the same device tree and therefore it wouldn't be really required to determine the SoC at runtime. -- Stefan _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot