diff options
author | Lukasz Majewski <lukma@denx.de> | 2018-05-02 16:10:54 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-05-10 20:38:32 -0400 |
commit | a8be2494632894669f0b78391b8c1b4a82877757 (patch) | |
tree | 9db67027e3ff86fc3b8560115d4fb247cfde24dd /common/spl/spl.c | |
parent | bc8c440fa48eb9c514829da785271a95604edbcc (diff) | |
download | u-boot-a8be2494632894669f0b78391b8c1b4a82877757.zip u-boot-a8be2494632894669f0b78391b8c1b4a82877757.tar.gz u-boot-a8be2494632894669f0b78391b8c1b4a82877757.tar.bz2 |
bootcount: spl: Extend SPL to support bootcount incrementation
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>
Diffstat (limited to 'common/spl/spl.c')
-rw-r--r-- | common/spl/spl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 3dafeae..6606417 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -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; |