]> git.baikalelectronics.ru Git - uboot.git/commit
env: add spi_flash_read_env function
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Tue, 11 Dec 2018 09:13:56 +0000 (10:13 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 16 Jan 2019 21:14:46 +0000 (16:14 -0500)
commit7fb32bf81552fac958297404070069ac93059649
tree0cc4030df921f70bbdd87cb482f552df439a3463
parent3466d9a678f5f3411a6378653cee862b0dc36af0
env: add spi_flash_read_env function

The spi_flash_read_env function is a wrapper over spi_flash_read, which
enables the env to read multiple flash page size from flash until '\0\0'
is read or the end of env partition is reached. Instead of reading the
entire env size. When it reads '\0\0', it stops reading further the env
and assumes that the rest of env is '\0'.

This is an optimization for large environments that contain few bytes
environment variables. In this case it doesn't need to read the entire
environment and only few pages.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
env/sf.c