Skip to content

Commit

Permalink
Don't start WDT if it was last reset source
Browse files Browse the repository at this point in the history
Prevent a case where the board is unbootable due to WDT continuously
timing out. May allow recovery from OS depending on the cause.

Signed-off-by: Tim Crawford <[email protected]>
  • Loading branch information
crawfxrd committed Dec 5, 2024
1 parent cd50ece commit 1f2beb0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/board/system76/common/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ void main(void) {
gpio_debug();
#endif

wdt_init();
// XXX: Currently, EC upgrade process will trigger a WDT reset after it
// finishes writing the flash.
if (ec_reset_source() == RESET_SOURCE_WDT) {
ERROR("\n<<< WDT reset occurred! >>>\n\n");
} else {
wdt_init();
}

INFO("System76 EC board '%s', version '%s'\n", board(), version());

Expand Down

0 comments on commit 1f2beb0

Please sign in to comment.