mbox series

[0/2] add CONFIG_ENV_SECT_SIZE_AUTO

Message ID 20200506084701.8076-1-rasmus.villemoes@prevas.dk
Headers show
Series add CONFIG_ENV_SECT_SIZE_AUTO | expand

Message

Rasmus Villemoes May 6, 2020, 8:46 a.m. UTC
This is roughly the U-Boot side equivalent to commit e282c422e0
(tools: fw_env: use erasesize from MEMGETINFO ioctl), at least for
SPI_FLASH backend.

When CONFIG_ENV_SECT_SIZE_AUTO is not selected (and it is of course
default n), there's no functional change, and the compiler even seems
to generate identical binary code.

The motivation is to cut about half a second off boottime on our newer
revisions, while still having the same U-Boot binary work on both.

Rasmus Villemoes (2):
  env/sf.c: use a variable to hold the sector size
  env: add CONFIG_ENV_SECT_SIZE_AUTO

 env/Kconfig | 14 ++++++++++++++
 env/sf.c    | 32 ++++++++++++++++++++------------
 2 files changed, 34 insertions(+), 12 deletions(-)