[PATCH v3 1/2] env: mmc: Make redundant env in both eMMC boot partitions consider DT properties

Mattijs Korpershoek mkorpershoek at baylibre.com
Tue Feb 25 17:30:47 CET 2025


Hi Marek,

Thank you for the patch.

On ven., févr. 21, 2025 at 19:47, Marek Vasut <marex at denx.de> wrote:

> Introduce a new function mmc_env_is_redundant_in_both_boot_hwparts()
> which replaces IS_ENABLED(ENV_MMC_HWPART_REDUND) and internally does
> almost the same check as the macro which assigned ENV_MMC_HWPART_REDUND
> did, and call it in place of IS_ENABLED(ENV_MMC_HWPART_REDUND).
>
> The difference compared to IS_ENABLED(ENV_MMC_HWPART_REDUND) is
> in the last conditional, which does not do plain macro compare
> (CONFIG_ENV_OFFSET == CONFIG_ENV_OFFSET_REDUND), but instead does
> mmc_offset(mmc, 0) == mmc_offset(mmc, 1). If OF_CONTROL is not
> in use, this gets optimized back to original macro compare, but
> if OF_CONTROL is in use, this also takes into account the DT
> properties u-boot,mmc-env-offset and u-boot,mmc-env-offset-redundant.
>
> Signed-off-by: Marek Vasut <marex at denx.de>

Reviewed-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>

> ---


More information about the U-Boot mailing list