[PATCH v2 1/1] bootcount: add a new driver with syscon as backend

Heiko Schocher hs at denx.de
Mon Aug 23 06:33:24 CEST 2021


Hello Nandor,

On 10.06.21 14:40, Nandor Han wrote:
> The driver will use a syscon regmap as backend and supports both
> 16 and 32 size value. The value will be stored in the CPU's endianness.
> 
> Signed-off-by: Nandor Han <nandor.han at vaisala.com>
> ---
> 
> Notes:
>     Description
>     -----------
>     Add a new driver for bootcount feature that supports `syscon` device as
>     backend.
> 
>     Testing
>     -------
>     UnitTests:
>     1. Verify that unit-tests run successfully: PASS
>     ```
>     ./test/py/test.py --bd sandbox --build -k ut_dm_bootcount -v
> 
>     test/py/tests/test_ut.py::test_ut[ut_dm_bootcount_rtc] PASSED                [ 33%]
>     test/py/tests/test_ut.py::test_ut[ut_dm_bootcount_syscon_four_bytes] PASSED  [ 66%]
>     test/py/tests/test_ut.py::test_ut[ut_dm_bootcount_syscon_two_bytes] PASSED   [100%]
>     ```
> 
>     Using hardware:
>     Board: i.MX6sx based dev board
>     U-Boot version: 2020.01
>     1. Use `bootcount` command to verity that value is updated
>     correctly: PASS
> 
> 
> Changes since v1:
>  - rebased
> 
>  arch/sandbox/dts/test.dts                     |  14 ++
>  configs/sandbox_defconfig                     |   1 +
>  doc/device-tree-bindings/bootcount-syscon.txt |  25 +++
>  drivers/bootcount/Kconfig                     |  12 ++
>  drivers/bootcount/Makefile                    |   1 +
>  drivers/bootcount/bootcount_syscon.c          | 159 ++++++++++++++++++
>  test/dm/bootcount.c                           |  48 +++++-
>  7 files changed, 257 insertions(+), 3 deletions(-)
>  create mode 100644 doc/device-tree-bindings/bootcount-syscon.txt
>  create mode 100644 drivers/bootcount/bootcount_syscon.c

Applied to u-boot-i2c.git master

Thanks!

bye,
Heiko

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de


More information about the U-Boot mailing list