soc/amd/glinda: Update MCA banks
[coreboot2.git] / src / mainboard / google / storm / reset.c
blob8fdf6fc2549e8a7aa1cbc30897d8e324b679ff9b
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/mmio.h>
5 #include <soc/iomap.h>
6 #include <reset.h>
8 /* Watchdog bite time set to default reset value */
9 #define RESET_WDT_BITE_TIME 0x31F3
11 /* Watchdog bark time value is kept larger than the watchdog timeout
12 * of 0x31F3, effectively disabling the watchdog bark interrupt
14 #define RESET_WDT_BARK_TIME (5 * RESET_WDT_BITE_TIME)
16 static void wdog_reset(void)
18 printk(BIOS_DEBUG, "\nResetting with watchdog!\n");
20 write32(APCS_WDT0_EN, 0);
21 write32(APCS_WDT0_RST, 1);
22 write32(APCS_WDT0_BARK_TIME, RESET_WDT_BARK_TIME);
23 write32(APCS_WDT0_BITE_TIME, RESET_WDT_BITE_TIME);
24 write32(APCS_WDT0_EN, 1);
25 write32(APCS_WDT0_CPU0_WDOG_EXPIRED_ENABLE, 1);
28 void do_board_reset(void)
30 wdog_reset();