Skip to content
  • Horatiu Vultur's avatar
    env: add spi_flash_read_env function · 9a9d66f5
    Horatiu Vultur authored and Tom Rini's avatar Tom Rini committed
    
    
    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: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
    9a9d66f5