public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] am335x: Switch to CONFIG_SPL_BOOTCOUNT_SUPPORT
Date: Fri, 27 Sep 2013 15:26:09 -0400	[thread overview]
Message-ID: <1380309969-5618-3-git-send-email-trini@ti.com> (raw)
In-Reply-To: <1380309969-5618-1-git-send-email-trini@ti.com>

Signed-off-by: Tom Rini <trini@ti.com>
---
 board/ti/am335x/board.c            |    4 ++++
 include/configs/ti_am335x_common.h |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index 0cfd048..0d6912b 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -239,6 +239,10 @@ int spl_start_uboot(void)
 #ifdef CONFIG_SPL_ENV_SUPPORT
 	env_init();
 	env_relocate_spec();
+#if defined(CONFIG_SPL_BOOTCOUNT_LIMIT) && defined(CONFIG_SPL_ENV_SUPPORT)
+	if (spl_bootcount_limit_exceeded())
+		return 1;
+#endif
 	if (getenv_yesno("boot_os") != 1)
 		return 1;
 #endif
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index a80bbf9..59c758c 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -40,7 +40,7 @@
 #define CONFIG_DRIVER_TI_CPSW		/* Driver for IP block */
 #define CONFIG_MII			/* Required in net/eth.c */
 
-#define CONFIG_BOOTCOUNT_LIMIT
+#define CONFIG_SPL_BOOTCOUNT_LIMIT
 #define CONFIG_SYS_BOOTCOUNT_ADDR	0x44E3E000
 
 /*
-- 
1.7.9.5

  parent reply	other threads:[~2013-09-27 19:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-27 19:26 [U-Boot] [PATCH 0/2] Add bootcount support to SPL Tom Rini
2013-09-27 19:26 ` [U-Boot] [PATCH 1/2] SPL: Add CONFIG_SPL_BOOTCOUNT_SUPPORT Tom Rini
2013-09-30  6:37   ` Stefan Roese
2013-10-02 13:14     ` Tom Rini
2013-09-27 19:26 ` Tom Rini [this message]
2013-09-28  1:20 ` [U-Boot] [PATCH 0/2] Add bootcount support to SPL Otavio Salvador
2013-10-02 15:07   ` Tom Rini

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=1380309969-5618-3-git-send-email-trini@ti.com \
    --to=trini@ti.com \
    --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