]> git.ipfire.org Git - thirdparty/linux.git/commit
nvmem: layouts: u-boot-env: add optional "env-size" property
authorJascha Sundaresan <flizarthanon@gmail.com>
Fri, 14 Nov 2025 11:06:32 +0000 (11:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Nov 2025 17:06:22 +0000 (18:06 +0100)
commit5b2f8c133d987ddc4a0e0ba7c58afb587ffeb96f
tree0c501f340da4fcc1513971c1ea8954bec4db0b24
parent2f9fae509895fc8198f521f4ace1fb4dda42c9a6
nvmem: layouts: u-boot-env: add optional "env-size" property

Some devices reserve a larger NVMEM region for the U-Boot environment
than the actual environment data length used by U-Boot itself. The CRC32
in the U-Boot header is calculated over the smaller data length, causing
CRC validation to fail when Linux reads the full partition.

Allow an optional device tree property "env-size" to specify the
environment data size to use for CRC computation.

v2: add missing $ref line to DT binding

Signed-off-by: Jascha Sundaresan <flizarthanon@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Link: https://patch.msgid.link/20251114110636.143268-5-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/nvmem/layouts/u-boot,env.yaml
drivers/nvmem/layouts/u-boot-env.c