[PATCH u-boot-marvell 5/8] arm: mvebu: turris_omnia: Allow to configure mSATA slot via env variable
Marek Behún
marek.behun at nic.cz
Wed Mar 2 13:36:26 CET 2022
> {
> - if (omnia_detect_sata()) {
> +#ifdef CONFIG_SPL_ENV_SUPPORT
> + /* Do not use env_load() as malloc() pool is too small at this stage */
> + bool has_env = (env_init() == 0);
> +#endif
> + const char *env_value = NULL;
> +
> +#ifdef CONFIG_SPL_ENV_SUPPORT
> + /* beware that env_get() returns static allocated memory */
> + env_value = has_env ? env_get("omnia_msata_slot") : NULL;
> +#endif
Can we use
if (IS_ENABLED(CONFIG_SPL_ENV_SUPPORT))
instead of macros here?
Marek
More information about the U-Boot
mailing list