Commit d833554d authored by Hugo Grostabussiat's avatar Hugo Grostabussiat

imx8m: Let board code override MMC env partition at runtime

Allow the board code to define a board_mmc_get_env_part() function which
will return the partition number to use for load/save operations on the
environment.
parent 900ac7e7
......@@ -16,6 +16,7 @@
#include <fdt_support.h>
#include <fsl_wdog.h>
#include <generated/version_autogenerated.h>
#include <mmc.h>
DECLARE_GLOBAL_DATA_PTR;
......@@ -409,6 +410,18 @@ int mmc_get_env_dev(void)
return board_mmc_get_env_dev(devno);
}
#ifdef CONFIG_SYS_MMC_ENV_PART
__weak uint board_mmc_get_env_part(struct mmc *mmc)
{
return CONFIG_SYS_MMC_ENV_PART;
}
uint mmc_get_env_part(struct mmc *mmc)
{
return board_mmc_get_env_part(mmc);
}
#endif
#ifdef CONFIG_SERIAL_TAG
void get_board_serial(struct tag_serialnr *serialnr)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment