]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bootcount: spl: Extend SPL to support bootcount incrementation
authorLukasz Majewski <lukma@denx.de>
Wed, 2 May 2018 14:10:54 +0000 (16:10 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 11 May 2018 00:38:32 +0000 (20:38 -0400)
This patch adds support for incrementation of the bootcount in SPL.
Such feature is necessary when we do want to use this feature with
'falcon' boot mode (which loads OS directly in SPL).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
common/spl/spl.c

index 3dafeaed3a18955331a75b6eda7bc886f6bc9769..6606417ff74d0c41e9ee29f8d861fb4f53714824 100644 (file)
@@ -19,6 +19,7 @@
 #include <dm/root.h>
 #include <linux/compiler.h>
 #include <fdt_support.h>
+#include <bootcount.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -416,6 +417,8 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
        spl_board_init();
 #endif
 
+       bootcount_inc();
+
        memset(&spl_image, '\0', sizeof(spl_image));
 #ifdef CONFIG_SYS_SPL_ARGS_ADDR
        spl_image.arg = (void *)CONFIG_SYS_SPL_ARGS_ADDR;