From 59dc87adc78cfcc2a4dba57a777c1c46ef6cd4d8 Mon Sep 17 00:00:00 2001 From: AKSHAY RAVEENDRAN K Date: Tue, 19 Apr 2022 06:25:32 +0000 Subject: [PATCH] PFR- Skip counting WDT2 event when EXTRST# is set when a kernel/u-boot panic or hang occurs the WDT2 will trigger a BMC reset and it will increase bootfailure count. If the bootfailure count is more than 3, the u-boot will abort the booting to BMC. This fix will remove the bootfailure count incrementing if PFR is provisioned as PFR CPLD will boot a recovery image anyway if the booting process is not working as expected and stopping in u-boot is not necessary. Tested: triggered kernel panic 4 times and confirmed that boot process is not aborted at u-boot in PFR provisioned mode. Signed-off-by: AKSHAY RAVEENDRAN K --- board/aspeed/ast2600_intel/intel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/aspeed/ast2600_intel/intel.c b/board/aspeed/ast2600_intel/intel.c index c0d82bfb4b..5a54051ac7 100644 --- a/board/aspeed/ast2600_intel/intel.c +++ b/board/aspeed/ast2600_intel/intel.c @@ -13,6 +13,7 @@ #define SYS_PWR_RESET_FLAG BIT(0) /* from scu_info.c */ #define WATCHDOG_RESET_BIT BIT(20) #define BOOT_FAILURE_LIMIT 3 +#define EXTRST_RESET_BIT BIT(1) #define SCU_014 0x014 /* Silicon Revision ID */ #define REV_ID_AST2600A0 0x05000303 /* AST2600 A0 */ @@ -703,7 +704,7 @@ int board_late_init(void) boot_failures = get_boot_failures(); - if (gd->reset_reason & WATCHDOG_RESET_BIT) + if ((gd->reset_reason & WATCHDOG_RESET_BIT) && !(gd->reset_reason & EXTRST_RESET_BIT)) set_boot_failures(boot_failures + 1); else set_boot_failures(0); -- 2.17.1