diff options
author | Goldschmidt Simon <sgoldschmidt@de.pepperl-fuchs.com> | 2018-02-09 23:23:17 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-02-16 19:12:42 +0300 |
commit | b2cdef4861befb65e784c01ed71a48bfb811ab38 (patch) | |
tree | bd8f5b467d2f09670e7167a2a66ceb95d8407347 /env/eeprom.c | |
parent | e1caa5841e8a9bc0ee658bdacae0519fa28e1e6a (diff) | |
download | u-boot-b2cdef4861befb65e784c01ed71a48bfb811ab38.tar.xz |
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/eeprom.c')
-rw-r--r-- | env/eeprom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/env/eeprom.c b/env/eeprom.c index 55d19d9d99..63842d6ff3 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -61,7 +61,10 @@ static int eeprom_bus_write(unsigned dev_addr, unsigned offset, return rcode; } -static int env_eeprom_get_char(int index) +/** Call this function from overridden env_get_char_spec() if you need + * this functionality. + */ +int env_eeprom_get_char(int index) { uchar c; unsigned int off = CONFIG_ENV_OFFSET; @@ -228,7 +231,6 @@ static int env_eeprom_save(void) U_BOOT_ENV_LOCATION(eeprom) = { .location = ENVL_EEPROM, ENV_NAME("EEPROM") - .get_char = env_eeprom_get_char, .load = env_eeprom_load, .save = env_save_ptr(env_eeprom_save), }; |