diff options
author | Patrick Delaunay <patrick.delaunay@st.com> | 2020-06-19 14:03:35 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-07-26 14:35:30 -0400 |
commit | 2f96b3238ca330897b8eb5bde82db2da2c07effb (patch) | |
tree | 1d872f72a499dead0dcd4b66caf4e5da3c6abf06 /include/env_internal.h | |
parent | 6718ebd0327a255c6e3e840c3105ee397c8c0326 (diff) | |
download | u-boot-2f96b3238ca330897b8eb5bde82db2da2c07effb.tar.gz |
cmd: env: check real location for env info command
Check the current ENV location, dynamically provided by the weak
function env_get_location to be sure that the environment can be
persistent.
The compilation flag ENV_IS_IN_DEVICE is not enough when the board
dynamically select the available storage location (according boot
device for example).
This patch solves issue for stm32mp1 platform, when the boot device
is USB.
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/env_internal.h')
-rw-r--r-- | include/env_internal.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/env_internal.h b/include/env_internal.h index e89fbdb1b75..66550434c3f 100644 --- a/include/env_internal.h +++ b/include/env_internal.h @@ -211,6 +211,17 @@ struct env_driver { extern struct hsearch_data env_htab; +/** + * env_get_location()- Provide the best location for the U-Boot environment + * + * It is a weak function allowing board to overidde the environment location + * + * @op: operations performed on the environment + * @prio: priority between the multiple environments, 0 being the + * highest priority + * @return an enum env_location value on success, or -ve error code. + */ +enum env_location env_get_location(enum env_operation op, int prio); #endif /* DO_DEPS_ONLY */ #endif /* _ENV_INTERNAL_H_ */ |