From: Lukasz Majewski Date: Wed, 2 May 2018 14:10:54 +0000 (+0200) Subject: bootcount: spl: Extend SPL to support bootcount incrementation X-Git-Tag: v2018.07-rc1~173 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a8be2494632894669f0b78391b8c1b4a82877757;p=u-boot 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 Reviewed-by: Stefan Roese Reviewed-by: Tom Rini --- diff --git a/common/spl/spl.c b/common/spl/spl.c index 3dafeaed3a..6606417ff7 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -19,6 +19,7 @@ #include #include #include +#include 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;