summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2019-07-16 01:39:40 -0700
committerYe Li <ye.li@nxp.com>2020-04-26 23:36:19 -0700
commit9dca18a27d97d0df6dd5f70e3c5a50c3a7bc0839 (patch)
tree121d0f9ffd9c48274c7a8b992af77692609b07c5 /include
parent5f2274d57bcb391701ba2690c018d4b691a86393 (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)
Diffstat (limited to 'include')
-rw-r--r--include/env.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/env.h b/include/env.h
index d6c2d751d6..5da50f3dd6 100644
--- a/include/env.h
+++ b/include/env.h
@@ -343,4 +343,10 @@ int env_get_char(int index);
*/
void env_reloc(void);
+#ifdef ENV_IS_EMBEDDED
+#define env_get_offset(x) x
+#else
+long long env_get_offset(long long defautl_offset);
+#endif
+
#endif