summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0045-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0045-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch')
-rw-r--r--meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0045-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0045-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0045-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch
new file mode 100644
index 000000000..5c2b307f3
--- /dev/null
+++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0045-PFR-Skip-counting-WDT2-event-when-EXTRST-is-set.patch
@@ -0,0 +1,45 @@
+From 59dc87adc78cfcc2a4dba57a777c1c46ef6cd4d8 Mon Sep 17 00:00:00 2001
+From: AKSHAY RAVEENDRAN K <akshay.raveendran.k@intel.com>
+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 <akshay.raveendran.k@intel.com>
+---
+ 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
+