mbox series

[resend,0/2] add CONFIG_ENV_SECT_SIZE_AUTO

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

Message

Rasmus Villemoes April 14, 2021, 6:51 p.m. UTC
This is a resend, just rebased to current master, of patches I sent
way back in May.

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(-)