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

Tom Rini trini at ti.com
Fri Sep 27 21:26:09 CEST 2013


Signed-off-by: Tom Rini <trini at 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



More information about the U-Boot mailing list