diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2019-06-10 16:26:36 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-06-11 17:26:38 +0000 |
commit | 59d060ebfe68082f4ea87214ffcda976c55176af (patch) | |
tree | e237e25e9979220a716b72b65d43fb559504bc60 /chip/it83xx/watchdog.c | |
parent | 3a668749460466ff002b5dd2cbf00529f97e5974 (diff) | |
download | chrome-ec-59d060ebfe68082f4ea87214ffcda976c55176af.tar.gz |
core:RISC-V / chip:IT83202
The IT83202 is an embedded controller with RISC-V core.
It supports maximum ram size to 256KB and internal flash to 1MB.
BUG=none
BRANCH=none
TEST=EC boots and test console commands (eg: taskinfo, version, sysjump...)
on it83202 EVB.
Change-Id: I424c0d2878beb941c816363b5c7a3f57fda9fd13
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1588300
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'chip/it83xx/watchdog.c')
-rw-r--r-- | chip/it83xx/watchdog.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chip/it83xx/watchdog.c b/chip/it83xx/watchdog.c index c9641114ab..54b916a61b 100644 --- a/chip/it83xx/watchdog.c +++ b/chip/it83xx/watchdog.c @@ -41,7 +41,11 @@ static void watchdog_set_warning_timer(int32_t ms, int init) void watchdog_warning_irq(void) { #ifdef CONFIG_SOFTWARE_PANIC +#if defined(CHIP_CORE_NDS32) pdata_ptr->nds_n8.ipc = get_ipc(); +#elif defined(CHIP_CORE_RISCV) + pdata_ptr->riscv.mepc = get_mepc(); +#endif #endif /* clear interrupt status */ task_clear_pending_irq(et_ctrl_regs[WDT_EXT_TIMER].irq); @@ -49,6 +53,7 @@ void watchdog_warning_irq(void) /* Reset warning timer. */ IT83XX_ETWD_ETXCTRL(WDT_EXT_TIMER) = 0x03; +#if defined(CHIP_CORE_NDS32) /* * The IPC (Interruption Program Counter) is the shadow stack register * of the PC (Program Counter). It stores the return address of program @@ -60,6 +65,10 @@ void watchdog_warning_irq(void) */ panic_printf("Pre-WDT warning! IPC:%08x LP:%08x TASK_ID:%d\n", get_ipc(), ilp, task_get_current()); +#elif defined(CHIP_CORE_RISCV) + panic_printf("Pre-WDT warning! MEPC:%08x RA:%08x TASK_ID:%d\n", + get_mepc(), ira, task_get_current()); +#endif if (!wdt_warning_fired++) /* |