diff options
author | Jun Lin <CHLin56@nuvoton.com> | 2022-10-07 13:06:37 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-10-07 19:19:56 +0000 |
commit | 330d0127c2ad148af26efea742c4ed0c78956a8c (patch) | |
tree | 1b528fc14e06039cb3ccf42e80cf1aedea334d25 | |
parent | 6dd2aa06551dace1a72c7adc010ad1ccad59cbe0 (diff) | |
download | chrome-ec-330d0127c2ad148af26efea742c4ed0c78956a8c.tar.gz |
zephyr: eSPI: disable interrupt before sysjump
This commit disables the host interrupts before sysjump. This prevents
the ISR from trigger during sysjump to cause the unexpected symptom.
BANCH=none
BUG=b:246963730
TEST=in skyrim, the hostcmd broken after sysjump symptom is fixed by
the related PR and CL.
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Change-Id: I861c907b0c251c642ae3e59d1a6553c3c52be38a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3937849
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: CH Lin <chlin56@nuvoton.com>
Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r-- | zephyr/shim/src/espi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/zephyr/shim/src/espi.c b/zephyr/shim/src/espi.c index d6f6bed314..5b3920b356 100644 --- a/zephyr/shim/src/espi.c +++ b/zephyr/shim/src/espi.c @@ -779,3 +779,13 @@ uint32_t get_8042_data(uint32_t data) return kbc->data; } + +static void espi_sysjump(void) +{ + uint32_t enable = 0; + + /* Disable host interface interrupts during the sysjump */ + espi_write_lpc_request(espi_dev, ECUSTOM_HOST_SUBS_INTERRUPT_EN, + &enable); +} +DECLARE_HOOK(HOOK_SYSJUMP, espi_sysjump, HOOK_PRIO_DEFAULT); |