From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 21 Mar 2018 11:20:35 +0100 (CET) Subject: [U-Boot] [PATCH v2 5/7] bootcount: spl: Extend SPL to support bootcount incrementation In-Reply-To: <20180314172450.8385-6-lukma@denx.de> References: <20180314172450.8385-1-lukma@denx.de> <20180314172450.8385-6-lukma@denx.de> Message-ID: <925479215.12506.1521627635947@office.mailbox.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de > Lukasz Majewski hat am 14. M=C3=A4rz 2018 um 18:24 geschr= ieben: >=20 >=20 > 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). >=20 > Signed-off-by: Lukasz Majewski >=20 > --- >=20 > Changes in v2: > - New patch - as suggested by Stefan Roese - bootcount_inc() is called > in common SPL code (./common/spl/spl.c), so other boards can also > reuse it without modification >=20 > common/spl/spl.c | 7 +++++++ > 1 file changed, 7 insertions(+) >=20 > diff --git a/common/spl/spl.c b/common/spl/spl.c > index b1ce56d0d0..01e7989869 100644 > --- a/common/spl/spl.c > +++ b/common/spl/spl.c > @@ -20,6 +20,9 @@ > #include > #include > #include > +#ifdef CONFIG_SPL_BOOTCOUNT_LIMIT > +#include > +#endif Is this #ifdef necessary? If not, please remove it.=20 > =20 > DECLARE_GLOBAL_DATA_PTR; > =20 > @@ -411,6 +414,10 @@ void board_init_r(gd_t *dummy1, ulong dummy2) > spl_board_init(); > #endif > =20 > +#ifdef CONFIG_SPL_BOOTCOUNT_LIMIT > + bootcount_inc(); > +#endif > + I think you can remove this #ifdef as well here. You have the #ifdef in the header already. Thanks, Stefan