[PATCH v2] bootcounter: add DM support for memory based bootcounter

Simon Glass sjg at chromium.org
Mon Mar 2 20:47:07 CET 2020


On Mon, 2 Mar 2020 at 07:44, Heiko Schocher <hs at denx.de> wrote:
>
> add DM/DTS support for the memory based bootcounter
> in drivers/bootcount/bootcount.c.
>
> Let the old implementation in, so boards which have
> not yet convert to DM/DTS do not break.
>
> Signed-off-by: Heiko Schocher <hs at denx.de>
> ---
> Travis build:
> https://travis-ci.org/hsdenx/u-boot-test/builds/657150708
>
> Changes in v2:
> - add changes requested from Simon Glass
>   - add comment to struct bootcount_mem_priv
>   - change type of singleword from u8 to bool
>   - use dev_read_addr() and dev_read_bool()
>   - use "u-boot,bootcount" for compatible
>     string instead "uboot,bootcount"
>
>  doc/device-tree-bindings/misc/bootcounter.txt | 21 +++++
>  drivers/bootcount/Kconfig                     |  7 ++
>  drivers/bootcount/Makefile                    |  1 +
>  drivers/bootcount/bootcount.c                 | 92 +++++++++++++++++++
>  4 files changed, 121 insertions(+)
>  create mode 100644 doc/device-tree-bindings/misc/bootcounter.txt

Reviewed-by: Simon Glass <sjg at chromium.org>

Possible nit: dm.h could be included unconditionally


More information about the U-Boot mailing list