From patchwork Wed May 6 08:46:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 245177 List-Id: U-Boot discussion From: rasmus.villemoes at prevas.dk (Rasmus Villemoes) Date: Wed, 6 May 2020 10:46:59 +0200 Subject: [PATCH 0/2] add CONFIG_ENV_SECT_SIZE_AUTO Message-ID: <20200506084701.8076-1-rasmus.villemoes@prevas.dk> 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(-)