coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
reset.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <console/console.h>
4 #include <device/mmio.h>
5 #include <soc/iomap.h>
6 #include <reset.h>
7 
8 /* Watchdog bite time set to default reset value */
9 #define RESET_WDT_BITE_TIME 0x31F3
10 
11 /* Watchdog bark time value is kept larger than the watchdog timeout
12  * of 0x31F3, effectively disabling the watchdog bark interrupt
13  */
14 #define RESET_WDT_BARK_TIME (5 * RESET_WDT_BITE_TIME)
15 
16 static void wdog_reset(void)
17 {
18  printk(BIOS_DEBUG, "\nResetting with watchdog!\n");
19 
26 }
27 
28 void do_board_reset(void)
29 {
30  wdog_reset();
31 }
static void write32(void *addr, uint32_t val)
Definition: mmio.h:40
#define printk(level,...)
Definition: stdlib.h:16
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
Definition: loglevel.h:128
void do_board_reset(void)
Definition: reset.c:8
static void wdog_reset(void)
Definition: reset.c:16
#define RESET_WDT_BARK_TIME
Definition: reset.c:14
#define RESET_WDT_BITE_TIME
Definition: reset.c:9
#define APCS_WDT0_EN
Definition: iomap.h:28
#define APCS_WDT0_CPU0_WDOG_EXPIRED_ENABLE
Definition: iomap.h:33
#define APCS_WDT0_BARK_TIME
Definition: iomap.h:30
#define APCS_WDT0_BITE_TIME
Definition: iomap.h:31
#define APCS_WDT0_RST
Definition: iomap.h:29