[PATCH] fw_env: add fallback to Linux's NVMEM based access

Arınç ÜNAL arinc.unal at arinc9.com
Tue May 9 07:59:41 CEST 2023


On 16.06.2022 21:59, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal at milecki.pl>
> 
> A new DT binding for describing environment data block has been added in
> Linux's commit 5db1c2dbc04c ("dt-bindings: nvmem: add U-Boot environment
> variables binding"). Once we get a proper Linux NVMEM driver it'll be
> possible to use Linux's binary interface for user-space as documented
> in the:
> https://www.kernel.org/doc/html/latest/driver-api/nvmem.html
> 
> This commits makes fw_env fallback to looking for a compatible NVMEM
> device in case config file isn't present. In a long term this may make
> config files redundant and avoid code (info) duplication.
> 
> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>

I see the Linux NVMEM driver [0] does not implement @reg_write. Does 
this mean only fw_printenv would work for this method?

[0] 
https://github.com/torvalds/linux/blob/c49f1a8af6bcf6d18576bca898f8083ca4b129e1/drivers/nvmem/u-boot-env.c

Arınç


More information about the U-Boot mailing list