Commit Graph

106 Commits

Author SHA1 Message Date
Simon Glass
81a4dea228 env: common: Drop env_get_char_init()
This function does nothing but call env_get_char_spec(). Drop it and
adjust its only caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-15 08:18:47 -04:00
Simon Glass
5fc5254084 env: common: Factor out the common env_valid check
The check for gd->env_valid is used in both the 'if' and 'else' part of
env_get_char(). Move it into that function instead for simplicity. Drop
that code from the two leaf functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-15 08:18:46 -04:00
Simon Glass
0219fb61c1 env: common: Drop env_get_addr()
This function is not used anywhere other than env_get_char(). Move the
code into that function.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-15 08:18:46 -04:00
Simon Glass
bcdfb8d5a5 env: common: Make env_get_addr/get_char_memory() static
These functions are not used outside this file. Make them static and order
them to avoid forward declarations.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-15 08:18:46 -04:00
Simon Glass
91d3aa05d0 env: Use tabs in ENV_IS_IN_FAT
Tidy up the formatting of this option.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-15 08:18:46 -04:00
Simon Glass
0649cd0d49 Move environment files from common/ to env/
About a quarter of the files in common/ relate to the environment. It
seems better to put these into their own subdirectory and remove the
prefix.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-15 08:18:45 -04:00