From: Stefan Roese <stefan.roese@mailbox.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 5/7] bootcount: spl: Extend SPL to support bootcount incrementation
Date: Wed, 21 Mar 2018 11:20:35 +0100 (CET) [thread overview]
Message-ID: <925479215.12506.1521627635947@office.mailbox.org> (raw)
In-Reply-To: <20180314172450.8385-6-lukma@denx.de>
> Lukasz Majewski <lukma@denx.de> hat am 14. März 2018 um 18:24 geschrieben:
>
>
> 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>
>
> ---
>
> 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
>
> common/spl/spl.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> 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 <dm/root.h>
> #include <linux/compiler.h>
> #include <fdt_support.h>
> +#ifdef CONFIG_SPL_BOOTCOUNT_LIMIT
> +#include <bootcount.h>
> +#endif
Is this #ifdef necessary? If not, please remove it.
>
> DECLARE_GLOBAL_DATA_PTR;
>
> @@ -411,6 +414,10 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
> spl_board_init();
> #endif
>
> +#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
next prev parent reply other threads:[~2018-03-21 10:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 17:24 [U-Boot] [PATCH v2 0/7] Provide SPL support for bootcount (in the case of using falcon boot mode) Lukasz Majewski
2018-03-14 17:24 ` [U-Boot] [PATCH v2 1/7] bootcount: spl: Enable bootcount support in SPL Lukasz Majewski
2018-03-21 10:19 ` Stefan Roese
2018-03-14 17:24 ` [U-Boot] [PATCH v2 2/7] bootcount: Add include guards into bootcount.h file Lukasz Majewski
2018-03-21 10:01 ` Stefan Roese
2018-03-14 17:24 ` [U-Boot] [PATCH v2 3/7] bootcount: Add function wrappers to handle bootcount increment and error checking Lukasz Majewski
2018-03-21 10:00 ` Stefan Roese
2018-03-21 10:07 ` Lukasz Majewski
2018-03-14 17:24 ` [U-Boot] [PATCH v2 4/7] bootcount: u-boot: Do not increment bootcount if already done in SPL Lukasz Majewski
2018-03-21 10:06 ` Stefan Roese
2018-03-14 17:24 ` [U-Boot] [PATCH v2 5/7] bootcount: spl: Extend SPL to support bootcount incrementation Lukasz Majewski
2018-03-21 10:20 ` Stefan Roese [this message]
2018-03-21 11:31 ` Lukasz Majewski
2018-03-14 17:24 ` [U-Boot] [PATCH v2 6/7] bootcount: display5: spl: Extend DISPLAY5 board SPL to support bootcount checking Lukasz Majewski
2018-03-21 10:10 ` Stefan Roese
2018-03-14 17:24 ` [U-Boot] [PATCH v2 7/7] bootcount: display5: config: Enable boot count feature in the display5 board Lukasz Majewski
2018-03-21 10:11 ` Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=925479215.12506.1521627635947@office.mailbox.org \
--to=stefan.roese@mailbox.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox