diff options
author | Patryk Duda <pdk@semihalf.com> | 2020-08-28 13:33:51 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-01 14:48:09 +0000 |
commit | 614d1069dc6ca73840c0b2039507c66c583a9bd3 (patch) | |
tree | 9f50972e01570ae204c664202ab7833802e8b49c /chip/it83xx/watchdog.c | |
parent | 44f1d185697e6dd071046fbb71a66647979ac4c4 (diff) | |
download | chrome-ec-614d1069dc6ca73840c0b2039507c66c583a9bd3.tar.gz |
it83xx/watchdog: Use newly provided functions to access panic data
This change removes usage of PANIC_DATA_PTR where possible. Now panic
data is accessed through functions that performs more checks and in case
of writing also moves other data when necessary.
BUG=b:165773837, b:162254118
BRANCH=none
TEST=make -j buildall
Signed-off-by: Patryk Duda <pdk@semihalf.com>
Change-Id: Ibe23fcbbf829d25e573104c8bc6a407f8acc0282
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2379849
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'chip/it83xx/watchdog.c')
-rw-r--r-- | chip/it83xx/watchdog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/it83xx/watchdog.c b/chip/it83xx/watchdog.c index 6e12b9ba37..f0e200c4ac 100644 --- a/chip/it83xx/watchdog.c +++ b/chip/it83xx/watchdog.c @@ -14,8 +14,6 @@ #include "task.h" #include "watchdog.h" -/* Panic data goes at the end of RAM. */ -static struct panic_data * const pdata_ptr = PANIC_DATA_PTR; /* Enter critical period or not. */ static int wdt_warning_fired; @@ -41,6 +39,8 @@ static void watchdog_set_warning_timer(int32_t ms, int init) void watchdog_warning_irq(void) { #ifdef CONFIG_SOFTWARE_PANIC + struct panic_data * const pdata_ptr = get_panic_data_write(); + #if defined(CHIP_CORE_NDS32) pdata_ptr->nds_n8.ipc = get_ipc(); #elif defined(CHIP_CORE_RISCV) |