Patchwork [U-Boot,2/2] am335x: Switch to CONFIG_SPL_BOOTCOUNT_SUPPORT

login
register
mail settings
Submitter Tom Rini
Date Sept. 27, 2013, 7:26 p.m.
Message ID <1380309969-5618-3-git-send-email-trini@ti.com>
Download mbox | patch
Permalink /patch/278672/
State New
Delegated to: Tom Rini
Headers show

Comments

Tom Rini - Sept. 27, 2013, 7:26 p.m.
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(-)

Patch

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
 
 /*