diff options
author | Goldschmidt Simon <sgoldschmidt@de.pepperl-fuchs.com> | 2018-02-09 20:23:17 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-02-16 11:12:42 -0500 |
commit | b2cdef4861befb65e784c01ed71a48bfb811ab38 (patch) | |
tree | bd8f5b467d2f09670e7167a2a66ceb95d8407347 /env/nvram.c | |
parent | e1caa5841e8a9bc0ee658bdacae0519fa28e1e6a (diff) |
env: restore old env_get_char() behaviour
With multiple environments, the 'get_char' callback for env
drivers does not really make sense any more because it is
only supported by two drivers (eeprom and nvram).
To restore single character loading for these drivers,
override 'env_get_char_spec'.
Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
Diffstat (limited to 'env/nvram.c')
-rw-r--r-- | env/nvram.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/env/nvram.c b/env/nvram.c index 6f76fe4b8d..7cc62b631e 100644 --- a/env/nvram.c +++ b/env/nvram.c @@ -41,7 +41,10 @@ env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR; #endif #ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE -static int env_nvram_get_char(int index) +/** Call this function from overridden env_get_char_spec() if you need + * this functionality. + */ +int env_nvram_get_char(int index) { uchar c; @@ -113,9 +116,6 @@ static int env_nvram_init(void) U_BOOT_ENV_LOCATION(nvram) = { .location = ENVL_NVRAM, ENV_NAME("NVRAM") -#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE - .get_char = env_nvram_get_char, -#endif .load = env_nvram_load, .save = env_save_ptr(env_nvram_save), .init = env_nvram_init, |