summaryrefslogtreecommitdiff
path: root/env/mmc.c
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2019-07-16 01:39:40 -0700
committerYe Li <ye.li@nxp.com>2022-04-06 18:02:55 +0800
commit85a48a205c6cc71f361c22548205318c9682bdf9 (patch)
tree0fc48e4d7bd268bed773ca15f63e16a1a575a061 /env/mmc.c
parentf07159b01105fe005ae19b156ee5a66ca3aef682 (diff)
MLK-22279-1 env: Add env_get_offset to override static env offset
Add env_get_offset interface to override static CONFIG_ENV_OFFSET, and update env location driver to use env_get_offset. So for different storage medium, we are able to store the env at different offset. We don't support this feature when CONFIG_ENV_IS_EMBEDDED is set. Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit 5b12d7cabb14bab9a95af7460b36c6c85db1b328) (cherry picked from commit 565d9002ac59b03d5bc77c6d88f2b93492166b66) (cherry picked from commit 445f20fe7162a15fd7415913434f24b6224bbe57) (cherry picked from commit 2964c7fc10210368e50572b1dcb23890c4f5c548) (cherry picked from commit dcb945c1b64b483c26c1a6885b4a596d947ff152)
Diffstat (limited to 'env/mmc.c')
-rw-r--r--env/mmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/env/mmc.c b/env/mmc.c
index 465b104559..f7da22a058 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -94,7 +94,7 @@ static inline s64 mmc_offset(int copy)
return val;
}
- defvalue = CONFIG_ENV_OFFSET;
+ defvalue = env_get_offset(CONFIG_ENV_OFFSET);
propname = dt_prop.offset;
#if defined(CONFIG_ENV_OFFSET_REDUND)
@@ -108,7 +108,7 @@ static inline s64 mmc_offset(int copy)
#else
static inline s64 mmc_offset(int copy)
{
- s64 offset = CONFIG_ENV_OFFSET;
+ s64 offset = env_get_offset(CONFIG_ENV_OFFSET);
#if defined(CONFIG_ENV_OFFSET_REDUND)
if (copy)